[
https://issues.apache.org/jira/browse/CAMEL-21738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17930094#comment-17930094
]
Andrej Vano commented on CAMEL-21738:
-------------------------------------
[~davsclaus] yes, I will take a look.
> 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: Improvement
> Components: camel-kubernetes
> Affects Versions: 4.10.0
> Reporter: Andrej Vano
> Priority: Major
> Fix For: 4.11.0
>
>
> 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)