This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit a21a5cb1b5ccebcb255f9cfb1898fa76f2258b2f Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Tue Sep 24 14:16:46 2019 +0200 Camel-Kubernetes: Samples code for secrets component --- .../main/docs/kubernetes-secrets-component.adoc | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc index cd7c2d6..6493aa9 100644 --- a/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc +++ b/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc @@ -110,3 +110,36 @@ The component supports 2 options, which are listed below. - createSecret - deleteSecret +== Kubernetes Secrets Producer Examples + +- listSecrets: this operation list the secrets on a kubernetes cluster + +[source,java] +-------------------------------------------------------------------------------- +from("direct:list"). + toF("kubernetes-secrets:///?kubernetesClient=#kubernetesClient&operation=listSecrets"). + to("mock:result"); +-------------------------------------------------------------------------------- + +This operation return a List of secrets from your cluster + +- listSecretsByLabels: this operation list the Secrets by labels on a kubernetes cluster + +[source,java] +-------------------------------------------------------------------------------- +from("direct:listByLabels").process(new Processor() { + + @Override + public void process(Exchange exchange) throws Exception { + Map<String, String> labels = new HashMap<>(); + labels.put("key1", "value1"); + labels.put("key2", "value2"); + exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_SECRETS_LABELS, labels); + } + }); + toF("kubernetes-secrets:///?kubernetesClient=#kubernetesClient&operation=listSecretsByLabels"). + to("mock:result"); +-------------------------------------------------------------------------------- + +This operation return a List of Secrets from your cluster, using a label selector (with key1 and key2, with value value1 and value2) +