lsergio commented on issue #6276:
URL: https://github.com/apache/camel-k/issues/6276#issuecomment-3284780016

   @squakez we're evaluating https://cast.ai/workload-optimization/ to monitor 
resource usage by the deployed integrations and they require a [custom 
label](https://docs.cast.ai/docs/workload-autoscaling-configuration#label-based-workload-selection)
 added to pods managed by custom controllers - like Camel K Integration or 
Knative Service.
   
   I checked the docs and the code, I don't think the Owner trait solves this 
case, as it would add labels to the Knative Service / Deployment / Cron Job, 
but those labels would not be propagated to the pods, as they're add not added 
to the podTemplate in each of these cases.
   
   As an example, the owner trait would create a Knative Service like this:
   ```
   apiVersion: serving.knative.dev/v1
   kind: Service
   metadata:
     name: hello
     labels:
        my-custom-label: some-value         # labels copied to the target 
object metadata
   spec:
     template:
       spec:
         containers:
           - image: ghcr.io/knative/helloworld-go:latest
             ports:
               - containerPort: 8080
             env:
               - name: TARGET
                 value: "World"
   ```
   but what I need is:
   ```
   apiVersion: serving.knative.dev/v1
   kind: Service
   metadata:
     name: hello
   spec:
     template:
       metadata:
         labels:
           my-custom-label: some-value    # labels copied to the target object 
pod spec template
       spec:
         containers:
           - image: ghcr.io/knative/helloworld-go:latest
             ports:
               - containerPort: 8080
             env:
               - name: TARGET
                 value: "World"
   ```
   
   Maybe we can improve the owner trait and add support for the pod template 
spec?
   
   


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

Reply via email to