You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2019/09/18 16:14:00 UTC

[jira] [Assigned] (CAMEL-13994) listPods operation of kubernetes component dont support namespace option

     [ https://issues.apache.org/jira/browse/CAMEL-13994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Cosentino reassigned CAMEL-13994:
----------------------------------------

    Assignee: Andrea Cosentino

> 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
>            Assignee: Andrea Cosentino
>            Priority: Major
>
> 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)