squakez commented on PR #6855:
URL: https://github.com/apache/camel-k/pull/6855#issuecomment-6629540442

   Hello. I had a look at this and the problem is really within the code. We're 
trying to call a cluster resource (Namespace) as a namespaced object. So, in 
order to sort this out you'll need to add a new func in util.kubernetes lookup:
   
   ```
   func LookupNamespace(ctx context.Context, c client.Client, name string) 
(*corev1.Namespace, error) {
        return c.CoreV1().Namespaces().Get(ctx, name, metav1.GetOptions{})
   }
   ```
   and you can call this from the profile code. You may also remove list and 
watch rbac from the Namespace resource, as we won't require to either list or 
watch, but just getting the resource kind.


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