imran raza khan created CAMEL-13994:
---------------------------------------
Summary: listPods operation of kubernetes component dont support
namespace option
Key: CAMEL-13994
URL: https://issues.apache.org/jira/browse/CAMEL-13994
Project: Camel
Issue Type: Bug
Components: camel-kubernetes
Affects Versions: 2.24.1
Reporter: imran raza khan
listPods operation dont support namespace option, i tried both by header and
inline parameter
.setHeader(KubernetesConstants.KUBERNETES_NAMESPACE_NAME, simple("my-qa"))
.toF("kubernetes-pods://%s?oauthToken=%s&trustCerts=true&namespace=my-qa&operation=listPods",
host, authToken)
.process(new ListPods())
.to("log:my?showAll=true&multiline=true");
it shows list of all pods but i only want for my-qa namespace.
i check code of
[https://github.com/apache/camel/blob/camel-2.x/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/pods/KubernetesPodsProducer.java]
and at line number 95
protected void doList(Exchange exchange, String operation) throws Exception {
PodList podList =
getEndpoint().getKubernetesClient().pods().inAnyNamespace().list();
its calling inAnyNamespace(), it should use inNamespace("") and if not mention
then inAnyNamespace
--
This message was sent by Atlassian Jira
(v8.3.4#803005)