lburgazzoli commented on issue #2446:
URL: https://github.com/apache/camel-k/issues/2446#issuecomment-908131260


   > The correct way to have it working with the actual `owner` trait is the 
following one:
   > 
   > ```
   > apiVersion: camel.apache.org/v1alpha1
   > kind: KameletBinding
   > ...
   > metadata:
   > ...
   >   labels:
   >     my-key: my-val
   >     ...
   >   annotations:
   >     trait.camel.apache.org/owner.target-labels: "my-key"
   > ```
   > 
   > ```
   > k get pod --show-labels -n operator-test
   > NAME                            READY   STATUS    RESTARTS   AGE   LABELS
   > timer-to-log-686fc7f567-gfhb6   1/1     Running   0          8s    
camel.apache.org/integration=timer-to-log,my-key=my-val,pod-template-hash=686fc7f567
   > ```
   > 
   > Basically we need to specify in the `KameletBinding` which labels (and/or 
annotations) we want to have in the underlying `Pod`.
   > 
   
   This is what I did in my set-up but was based on an 1.4 version so it may 
have been solved, need to re-test.
   
   > In the KameletBinding usage, I think it's a bit cumbersome as we need to 
re-declare a list of variables we already defined. In my opinion we should add 
a `owner.target-labels-all` to cover the generic usage of including all 
labels/annotations. We can also consider if the default for the 
`KameletBinding` is to use the `owner` trait, so the user won't have to bother 
to configure (he can disable by turning `enabled=false`).
   
   copying all the labels/annotations by default is a little bit risky imho, 
may be nice to have some support for regexp
   


-- 
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