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

   ### What happened?
   
   The IntegrationKit resource seems to save the trait annotations that have 
been used to build the kit. Some trait annotation configs do not influence the 
kit and get saved, too. This is a problem because subsequent integrations that 
resolve to that IntegrationKit inherit the trait annotation config and this 
influences the integration runtime.
   
   As an example you can use `trait.camel.apache.org/knative-service.enabled: 
'false'` annotation. When the integration that triggers the kit build uses this 
annotation it gets saved to the IntegrationKit resource:
   
   ```yaml
   apiVersion: camel.apache.org/v1
   kind: IntegrationKit
   metadata:
     annotations:
       camel.apache.org/operator.id: camel-k
       trait.camel.apache.org/knative-service.enabled: 'false'
   ```
   
   This is a problem because every integration that uses this IntegrationKit 
will also inherit the annotation trait config leading to the Knative service 
trait being disabled for the all integrations that use the kit.
   
   ### Steps to reproduce
   
   1. Start an integration that uses 
`trait.camel.apache.org/knative-service.enabled: 'false'`
   2. Make sure that the IntegrationKit is build for this integration and see 
the Knative service condition being disabled explicitly
   ```yaml
   status:
     conditions:
       - lastTransitionTime: '2024-06-11T15:59:40Z'
         lastUpdateTime: '2024-06-11T15:59:40Z'
         message: explicitly disabled
         reason: KnativeServiceNotAvailable
         status: 'False'
         type: KnativeServiceKnativeServiceAvailable
   ```
   3. Start an integration that matches the previously built kit but does not 
use the trait annotation at all
   4. See the Knative service trait also being disabled for this 2nd 
integration because it is explicitly disabled by trait config inherited from 
the integration kit
   5. We would expect the Knative service being enabled for the 2nd integration 
because this is the default behavior when Knative serving is available on the 
cluster
   
   ### Relevant log output
   
   _No response_
   
   ### Camel K version
   
   2.3.3


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to