Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13994

listPods operation of kubernetes component dont support namespace option

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      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

       

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            imranrazakhan imran raza khan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: