You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/09/26 09:00:58 UTC

[camel] 01/02: Camel-Kubernetes: Add build configs docs

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 41dd718148c77e5fae77bc934fb07e4e934c5ba0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Sep 26 10:59:45 2019 +0200

    Camel-Kubernetes: Add build configs docs
---
 .../docs/openshift-build-configs-component.adoc    | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/components/camel-kubernetes/src/main/docs/openshift-build-configs-component.adoc b/components/camel-kubernetes/src/main/docs/openshift-build-configs-component.adoc
index 4ccfd48..09be817 100644
--- a/components/camel-kubernetes/src/main/docs/openshift-build-configs-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/openshift-build-configs-component.adoc
@@ -82,3 +82,36 @@ with the following path and query parameters:
 - listBuildConfigs
 - listBuildConfigsByLabels
 - getBuildConfig
+
+== Openshift Build Configs Producer Examples
+
+- listBuilds: this operation list the Build Configs on an Openshift cluster
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:list").
+    toF("openshift-build-configs:///?kubernetesClient=#kubernetesClient&operation=listBuildConfigs").
+    to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation return a List of Builds from your Openshift cluster
+
+- listBuildsByLabels: this operation list the build configs by labels on an Openshift 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_BUILD_CONFIGS_LABELS, labels);
+            }
+        });
+    toF("openshift-build-configs:///?kubernetesClient=#kubernetesClient&operation=listBuildConfigsByLabels").
+    to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation return a List of Build configs from your cluster, using a label selector (with key1 and key2, with value value1 and value2)