You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/12/20 16:43:42 UTC

[GitHub] [camel-k] gansheer opened a new issue, #3941: Container trait : setting `container.name` result in wrong integration condition type `Ready`

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

   ## Environment
   
   **Version of camel k client** : main (commit 45c22057a61d1d4d44a8fb2f898471e527cb9bfb)
   **Kubernetes** : minikube 1.27.1
   
   ## Description
   
   I was writing some e2e test on container trait that had a strange behavior on condition status checking. 
   Using a different Container trait value for `container.name` than the default `integration` results in an error in the monitoring of status in the integration object.
   
   To reproduce the problem: 
   * execute  same route with the trait (and without to compare results): 
   
   ```sh
   $ kamel run Apps.java --name apps
   $ kamel run Apps.java -t container.name=notintegration --name apps2
   ```
   
   * Check if the pods are running:
   ```
   NAMESPACE     NAME                                   READY   STATUS    RESTARTS        AGE
   default       pod/apps-5df75b99c-d6fdn               1/1     Running   0               9m39s
   default       pod/apps2-657ccf8fd7-bfpwz             1/1     Running   0               9m31s
   ```
   
   * Check the integration without the trait:
   ```
   ...
   status:
     conditions:
   ...
     - firstTruthyTime: "2022-12-20T16:17:59Z"
       lastTransitionTime: "2022-12-20T16:17:59Z"
       lastUpdateTime: "2022-12-20T16:17:59Z"
       message: 1/1 ready replicas
       reason: DeploymentReady
       status: "True"
       type: Ready
   ....
   ```
   
   
   * Check the integration with the trait:
   ```
   ...
   status:
     conditions:
   ...
     - lastTransitionTime: "2022-12-20T16:18:05Z"
       lastUpdateTime: "2022-12-20T16:18:05Z"
       message: 0/1 ready replicas
       reason: DeploymentProgressing
       status: "False"
       type: Ready
   ....
   ```
   
   The code that results in this error is the following : https://github.com/apache/camel-k/blob/67aad9bfec4023f6e5521d5043c421a2f772a75b/pkg/controller/integration/monitor.go#L410-L415
   The container name filter is the hardcoded "integration" value.
   
   The only other way I see that could allow to filter "integration pods" would be to filter by the presence of metadata's label "camel.apache.org/integration" in the pod description.
   
   @squakez @tadayosi do you see another way ?
   


-- 
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-unsubscribe@camel.apache.org.apache.org

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


[GitHub] [camel-k] tadayosi closed issue #3941: Container trait : setting `container.name` result in wrong integration condition type `Ready`

Posted by GitBox <gi...@apache.org>.
tadayosi closed issue #3941: Container trait : setting `container.name` result in wrong integration condition type `Ready` 
URL: https://github.com/apache/camel-k/issues/3941


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-k] tadayosi commented on issue #3941: Container trait : setting `container.name` result in wrong integration condition type `Ready`

Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #3941:
URL: https://github.com/apache/camel-k/issues/3941#issuecomment-1360879296

   Good catch!  Yes, it shouldn't be hardcoded there. Probably the only way to get the designated container name is to get it from the Integration's `spec.traits.container.name`?


-- 
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-unsubscribe@camel.apache.org

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