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/23 07:44:48 UTC

[camel] branch master updated (e2e0612 -> 249d04a)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from e2e0612  Regen docs
     new 7f1247b  Camel-Kubernetes: Added samples code for job component
     new 249d04a  Regen docs

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/docs/kubernetes-job-component.adoc    | 33 ++++++++++++++++++++++
 .../ROOT/pages/kubernetes-job-component.adoc       | 33 ++++++++++++++++++++++
 2 files changed, 66 insertions(+)


[camel] 01/02: Camel-Kubernetes: Added samples code for job component

Posted by ac...@apache.org.
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 7f1247b76a045c123718ee01324993d790a3cdf0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 23 09:43:46 2019 +0200

    Camel-Kubernetes: Added samples code for job component
---
 .../src/main/docs/kubernetes-job-component.adoc    | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-job-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-job-component.adoc
index 5766812..1bdc9aa 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-job-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-job-component.adoc
@@ -118,3 +118,36 @@ The component supports 2 options, which are listed below.
 - createJob
 - deleteJob
 
+== Kubernetes Job Producer Examples
+
+- listJob: this operation list the jobs on a kubernetes cluster
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:list").
+    toF("kubernetes-job:///?kubernetesClient=#kubernetesClient&operation=listJob").
+    to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation return a List of Job from your cluster
+
+- listJobByLabels:  this operation list the jobs 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_JOB_LABELS, labels);
+            }
+        });
+    toF("kubernetes-job:///?kubernetesClient=#kubernetesClient&operation=listJobByLabels").
+    to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation return a List of Jobs from your cluster, using a label selector (with key1 and key2, with value value1 and value2)
+


[camel] 02/02: Regen docs

Posted by ac...@apache.org.
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 249d04ab1ec278bf75cfa2c688b7f287842f717f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 23 09:44:23 2019 +0200

    Regen docs
---
 .../ROOT/pages/kubernetes-job-component.adoc       | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/docs/components/modules/ROOT/pages/kubernetes-job-component.adoc b/docs/components/modules/ROOT/pages/kubernetes-job-component.adoc
index 1c8bd43..24a9801 100644
--- a/docs/components/modules/ROOT/pages/kubernetes-job-component.adoc
+++ b/docs/components/modules/ROOT/pages/kubernetes-job-component.adoc
@@ -119,3 +119,36 @@ The component supports 2 options, which are listed below.
 - createJob
 - deleteJob
 
+== Kubernetes Job Producer Examples
+
+- listJob: this operation list the jobs on a kubernetes cluster
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:list").
+    toF("kubernetes-job:///?kubernetesClient=#kubernetesClient&operation=listJob").
+    to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation return a List of Job from your cluster
+
+- listJobByLabels:  this operation list the jobs 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_JOB_LABELS, labels);
+            }
+        });
+    toF("kubernetes-job:///?kubernetesClient=#kubernetesClient&operation=listJobByLabels").
+    to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation return a List of Jobs from your cluster, using a label selector (with key1 and key2, with value value1 and value2)
+