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
The following commit(s) were added to refs/heads/master by this push: new 0f3ce88 Camel-Kubernetes: Adding some examples of configmaps Producer operations 0f3ce88 is described below commit 0f3ce88bc8c9fbd4c7b1a5f33e08113d7d87391e Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Fri Sep 20 13:10:52 2019 +0200 Camel-Kubernetes: Adding some examples of configmaps Producer operations --- .../docs/kubernetes-config-maps-component.adoc | 33 +++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc index a5d35a8..e4069a3 100644 --- a/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc +++ b/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc @@ -109,5 +109,36 @@ The component supports 2 options, which are listed below. - createConfigMap - deleteConfigMap - +== Kubernetes ConfigMaps Producer Examples + +- listConfigMaps: this operation copy an object from one bucket to a different one + +[source,java] +-------------------------------------------------------------------------------- +from("direct:list"). + to("kubernetes-config-maps:///?kubernetesClient=#kubernetesClient&operation=listConfigMaps"). + to("mock:result"); +-------------------------------------------------------------------------------- + +This operation return a List of ConfigMaps from your cluster + +- listConfigMapsByLabels: this operation copy an object from one bucket to a different one + +[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_CONFIGMAPS_LABELS, labels); + } + }); + to("kubernetes-config-maps:///?kubernetesClient=#kubernetesClient&operation=listConfigMapsByLabels"). + to("mock:result"); +-------------------------------------------------------------------------------- + +This operation return a List of ConfigMaps from your cluster, using a label selector (with key1 and key2, with value value1 and value2)