[ https://issues.apache.org/jira/browse/CAMEL-21738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrej Vano updated CAMEL-21738: -------------------------------- Summary: camel-kubernetes: Unify listing resources in producer, in regard to namespace (was: camel-kubernetes: Unify listing resources in producer) > camel-kubernetes: Unify listing resources in producer, in regard to namespace > ----------------------------------------------------------------------------- > > 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 > Priority: Major > > 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)