Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-17 Thread via GitHub


squakez closed issue #5060: Operator 2.2.0 does not spawn builder pod with 
strategy: pod
URL: https://github.com/apache/camel-k/issues/5060


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-15 Thread via GitHub


squakez commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1891648395

   > > I think it's a bug. However, it does not make sense to rollback IMO. 
Let's try to find a solution which would cover both requirements if possible.
   > 
   > The main issue here is from the fact we share the same code model for 
IntegrationPlatform CRD and Integration CRD (and probably others). While the 
default values for the IntegrationPlatform CR are true, they are not for the 
Integration CR. The default values for Integration CR are the one inherited 
from the IntegrationPlatform CR. Only an **explicit** declaration from the 
Integration CR should override the IntegrationPlatform CR. That's why I want to 
revert the `+kubebuilder:default` changes. We can then think of a way to deal 
with having default values different for IntegrationPlatform CRD and 
Integration CRD generated.
   
   Yeah. If you're working on the revert, also, please make sure to include at 
least one test to avoid this failure in the future. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-15 Thread via GitHub


gansheer commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1891645635

   > I think it's a bug. However, it does not make sense to rollback IMO. Let's 
try to find a solution which would cover both requirements if possible.
   
   The main issue here is from the fact we share the same code model for 
IntegrationPlatform CRD and Integration CRD (and probably others). While the 
default values for the IntegrationPlatform CR are true, they are not for the 
Integration CR. The default values for Integration CR are the one inherited 
from the IntegrationPlatform CR. Only an **explicit** declaration from the 
Integration CR should override the IntegrationPlatform CR.
   That's why I want to revert the `+kubebuilder:default` changes. We can then 
think of a way to deal with having default values different for 
IntegrationPlatform CRD and Integration CRD generated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-15 Thread via GitHub


squakez commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1891564994

   I think it's a bug. However, it does not make sense to rollback IMO. Let's 
try to find a solution which would cover both requirements if possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-12 Thread via GitHub


gansheer commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1889613363

   This is a side effect from this fix 
https://github.com/apache/camel-k/pull/4887. Since default value where added in 
the CRD will explicitly declare the "default" values defined in the CR.
   
   In short, this IntegrationPlatform:
   ```
   apiVersion: camel.apache.org/v1
   kind: IntegrationPlatform
   metadata:
 name: camel-k-2
 namespace: camel-k
   spec:
 build:
   registry:
 address: "10.96.90.251"
 insecure: true
 cluster: ""
 traits:
   builder:
 tasksRequestCPU:
 - builder:2000m
   ``` 
   When added to the kubernetes by `kubectl create -f ip.yaml` will result in:
   ```
   apiVersion: camel.apache.org/v1
   kind: IntegrationPlatform
   metadata:
 creationTimestamp: "2024-01-12T16:17:09Z"
 generation: 1
 name: camel-k-2
 namespace: camel-k
 resourceVersion: "4064"
 uid: e139a899-c1f6-42e3-935b-287ca84eef0a
   spec:
 build:
   registry:
 address: 10.96.90.251
 insecure: true
 cluster: ""
 traits:
   builder:
 incrementalImageBuild: true
 orderStrategy: sequential
 strategy: routine
 tasksRequestCPU:
 - builder:2000m
   ```
   
   It will be the same for Integration:
   ```
   apiVersion: camel.apache.org/v1
   kind: Integration
   metadata:
 name: int-test
 namespace: camel-k
 resourceVersion: "5154"
 uid: 0348d504-dd4b-4ca2-a558-045ae5d51f8d
   spec:
 flows:
 ...
 traits:
   builder:
 incrementalImageBuild: true
 orderStrategy: sequential
 strategy: routine
 tasksRequestCPU:
 - builder:2000m
   ```
   
   The way we managed the priority/default values might be at fault. My first 
intuition would be to rollback the fix 
https://github.com/apache/camel-k/pull/4887.  WDYT @lburgazzoli @squakez ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-12 Thread via GitHub


gansheer commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1888741141

   @squakez I'll take care of it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-12 Thread via GitHub


anerathil commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1888716381

   No i just added it in the helm chart as well. My first post line 39.
   
![image](https://github.com/apache/camel-k/assets/19164845/a7df1993-c520-4326-a6a0-ef20ef677ba2)
   And yes, i did specify it without the strategy because i thought "i just 
want to increase resources".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-12 Thread via GitHub


squakez commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1888692352

   Thanks. Yes, if there is no builder trait strategy specified, it must use 
the IP strategy. What I am not understanding is what was the procedure you've 
followed to add the builder trait. Did you edit the IP and specified the 
builder trait spec without the strategy?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-12 Thread via GitHub


anerathil commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1888672485

   Ok i removed the 
   ```
   buildConfiguration:
 strategy: pod
   ```
   
   section and added _strategy: pod_ to the builder trait. 
   with ...
   
   - 2.2.0 and global:true it is working
   - 2.2.0 and global:false it is also working :)
   
   Seems like it was a conflict between the IP configuration and the default 
value of the builder trait overwriting it.
   
   **Initially I proceeded as follows:**
   - deployed the operator
   - recognized that i want builder pods in a local setup to save resources on 
the operator
   -- so i did set strategy to pod in the integration platform in helm
   - then i realized, that the builder pods need more resources so i added the 
builder trait
   -- but did not expected the builder traits strategy default value to 
override the integration platform strategy value
   
   Now everything is working as expected. Maybe it would be great to extend the 
builder trait to the following:
   - if the builder trait is added without a strategy use the IP strategy?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-12 Thread via GitHub


squakez commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1888656582

   Yes, it seems that your IntegrationPlatfom is overriding that value setting 
the builder trait to `routine`. Is it something that you're setting 
specifically or is the default value that for some reason got slipped in?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-12 Thread via GitHub


anerathil commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1888641988

   Ahh after reading through my post:
   
   For me it looks like the builder trait is the "issue"? will also set the 
strategy in there and give an update!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-12 Thread via GitHub


anerathil commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1888639038

   Hey :)
   
   I just recreated the cluster and re-deployed with global:false:
   
   V 2.1.0:
   As expected with global false the operator creates a builder pod in the 
camel-k namespace.
   
   ---
   
   V 2.2.0:
   The operator does not spawn a builder pod and runs the build in its 
container :/
   
   The IP deployed by helm befor the operator update:
   ```
   Name: camel-k
   Namespace:camel-k-system
   Labels:   app=camel-k
 app.kubernetes.io/instance=camel-k-operator
 app.kubernetes.io/managed-by=Helm
 app.kubernetes.io/name=camel-k
 app.kubernetes.io/version=2.2.0
 helm.sh/chart=camel-k-2.2.0
   Annotations:  meta.helm.sh/release-name: camel-k-operator
 meta.helm.sh/release-namespace: camel-k-system
   API Version:  camel.apache.org/v1
   Kind: IntegrationPlatform
   Metadata:
 Creation Timestamp:  2024-01-12T08:16:01Z
 Generation:  1
 Resource Version:798
 UID: 707c6522-386f-4101-b2a8-2b1904639e2b
   Spec:
 Build:
   Build Configuration:
 Strategy:  pod
   Registry:
 Address:   k3d-k3d.localhost:5000
 Insecure:  true
 Cluster:   
 Traits:
   Builder:
 Incremental Image Build:  true
 Order Strategy:   sequential
 Strategy: routine
 Tasks Request CPU:
   builder:2000m
 Tasks Request Memory:
   builder:2Gi
   Events:  
   
   
   After the initial update its state is:
   ```
   NAMESPACE↑ NAMEPHASE 
BUILD STRATEGYPUBLISH STRATEGYREGISTRY ADDRESS  
 DEFAULT RUNTIME  │
   camel-k-system camel-k Ready 
pod   Spectrum
k3d-k3d.localhost:5000 3.2.3│
   ```
   
   ```
   Name: camel-k
   Namespace:camel-k-system
   Labels:   app=camel-k
 app.kubernetes.io/instance=camel-k-operator
 app.kubernetes.io/managed-by=Helm
 app.kubernetes.io/name=camel-k
 app.kubernetes.io/version=2.2.0
 helm.sh/chart=camel-k-2.2.0
   Annotations:  meta.helm.sh/release-name: camel-k-operator
 meta.helm.sh/release-namespace: camel-k-system
   API Version:  camel.apache.org/v1
   Kind: IntegrationPlatform
   Metadata:
 Creation Timestamp:  2024-01-12T08:16:01Z
 Generation:  1
 Resource Version:1296
 UID: 707c6522-386f-4101-b2a8-2b1904639e2b
   Spec:
 Build:
   Build Configuration:
 Strategy:  pod
   Registry:
 Address:   k3d-k3d.localhost:5000
 Insecure:  true
 Cluster:   
 Traits:
   Builder:
 Incremental Image Build:  true
 Order Strategy:   sequential
 Strategy: routine
 Tasks Request CPU:
   builder:2000m
 Tasks Request Memory:
   builder:2Gi
   Status:
 Build:
   Publish Strategy Options:
 Kaniko Persistent Volume Claim:  camel-k
   Base Image:eclipse-temurin:17
   Build Configuration:
 Order Strategy:  sequential
 Strategy:pod
   Maven:
 Cli Options:
   -V
   --no-transfer-progress
   -Dstyle.color=never
 Local Repository:  /etc/maven/m2
   Max Running Builds:  10
   Publish Strategy:Spectrum
   Registry:
 Address:k3d-k3d.localhost:5000
 Insecure:   true
   Runtime Version:  3.2.3
   Timeout:  5m0s
 Cluster:Kubernetes
 Conditions:
   Last Transition Time:  2024-01-12T08:16:14Z
   Last Update Time:  2024-01-12T08:16:14Z
   Message:   integration platform created
   Reason:IntegrationPlatformCreated
   Status:True
   Type:  Created
   Last Transition Time:  2024-01-12T08:16:14Z
   Last Update Time:  2024-01-12T08:16:14Z
   Message:   registry available at k3d-k3d.localhost:5000
   Reason:IntegrationPlatformRegistryAvailable
   Status:True
   Type:  RegistryAvailable
 Info:
   Git Commit:  c6a9348d8467f68800dabb7c845a411765fad8e3
   Go OS:   linux
   Go Version:  go1.21.0
 Kamelet:
   Repositories:
 Uri:  none
 Observed Generation:  1
 Phase:Ready
 Traits:
   Builder:
 Incremental Image Build:  true
 Order Strat

Re: [I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-11 Thread via GitHub


gansheer commented on issue #5060:
URL: https://github.com/apache/camel-k/issues/5060#issuecomment-1887610398

   Hi, thanks for reporting. 
   Could you check the IntegrationPlatform custom resources created to see if 
the buildConfiguration is applied ? I see in the log 
`{"level":"info","ts":"2024-01-08T21:30:50Z","logger":"camel-k.traits","msg":"User
 defined build strategy routine","trait":"builder"}` and wonder if the platform 
level configuration is actually present.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[I] Operator 2.2.0 does not spawn builder pod with strategy: pod [camel-k]

2024-01-11 Thread via GitHub


anerathil opened a new issue, #5060:
URL: https://github.com/apache/camel-k/issues/5060

   ### What happened?
   
   While:
   - Setting up a new K8s cluster via Kind
   - Deploying the Camel-K 2.2.0 operator (via Helm chart) with 
buildConfiguration strategy set to pod
   - Applying a integration
   
   I noticed that there were no builder pods created but the image was build 
inside the operator pod.
   
   After creating a new cluster and downgrading to operator 2.1.0 the operator 
spawned pods as expected.
   
   Attached you find the logs of the operators as well as my helmfile snipped 
to deploy the operator.
   
   
[operator_2.1.0.log](https://github.com/apache/camel-k/files/13905921/operator_2.1.0.log)
   
[operator_2.2.0.log](https://github.com/apache/camel-k/files/13905922/operator_2.2.0.log)
   
   (the error messages in the end should not matter i guess)
   
   Thanks :)
   
   ```repositories:
   - name: incubator
 url: https://charts.helm.sh/incubator
   - name: camel-k
 url: https://apache.github.io/camel-k/charts/
 
   releases:
   - name: camel-k-operator
 namespace: {{ .Values.namespaces.camelk }}
 chart: camel-k/camel-k
 version: 2.x.0 
 disableValidation: true
 labels:
   chapter: data
   package: camel-k
   component: base
 hooks:
 - events: ["preapply"]
   showlogs: true
   command: "kubectl"
   args: ["apply", "-n", "{{`{{.Values.namespaces.camelk}}`}}", "-f", 
"./templates"]
 - events: ["postuninstall"]
   showlogs: true
   command: "kubectl"
   args: ["delete", "-n", "{{`{{.Values.namespaces.camelk}}`}}", "-f", 
"./templates"]
 values:
 - operator:
 global: "true"
 resources:
   requests:
 cpu: 100m
 memory: 250Mi
   platform:
 build:
   registry:
 address: {{ env "K3d_REGISTRY_ENDPOINT" }}
 insecure: true
   buildConfiguration:
 strategy: pod
 traits:
   builder:
 tasksRequestCPU:
 - "builder:2000m"
 tasksRequestMemory:
 - "builder:2Gi"```
   
   
   ### Steps to reproduce
   
   1. Setup new cluster
   2. Deploy operator 2.2.0 via Helm chart, set strategy to pod
   3. See operator building the image in its container
   
   ### Relevant log output
   
   _No response_
   
   ### Camel K version
   
   2.2.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org