You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrej Vano (Jira)" <ji...@apache.org> on 2025/02/13 10:22:00 UTC

[jira] [Created] (CAMEL-21738) camel-kubernetes: Unify listing resources in producer

Andrej Vano created CAMEL-21738:
-----------------------------------

             Summary: camel-kubernetes: Unify listing resources in producer
                 Key: CAMEL-21738
                 URL: https://issues.apache.org/jira/browse/CAMEL-21738
             Project: Camel
          Issue Type: Bug
          Components: camel-kubernetes
    Affects Versions: 4.10.0
            Reporter: Andrej Vano


Looking at the various producers in camel-kubernetes components, it seems that there is no common approach for listing the resources when it comes to namespaced resources.

If the {{CamelKubernetesNamespaceName}} header is not present, the autowired k8s client uses:
- the namespace where the application runs, if it runs on k8s
- the namespace where I am logged in locally, when running the app locally against a k8s cluster.

If the header {{CamelKubernetesNamespaceName}} is not present, some producers will [just list in the current namespace|https://github.com/apache/camel/blob/main/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/persistent_volumes_claims/KubernetesPersistentVolumesClaimsProducer.java#L89-L93], some [list in all namespaces|https://github.com/apache/camel/blob/main/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/secrets/KubernetesSecretsProducer.java#L88-L91] - these don't require the namespace header at all. but then there are some that [are switching between ns/cluster based on the header|https://github.com/apache/camel/blob/main/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/pods/KubernetesPodsProducer.java#L89-L98].

It would be good to unify the approach.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)