You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by df...@apache.org on 2021/04/20 18:31:53 UTC

[camel-kamelets] branch main created (now 64094ad)

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

dfoulks pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


      at 64094ad  Added Exec Sink Kamelet

This branch includes the following new commits:

     new 5b0c59c  Added Exec Sink Kamelet
     new 50d921a  Added Exec Sink Kamelet
     new 2654193  Added Exec Sink Kamelet
     new 06a745b  Added Exec Sink Kamelet
     new 3627dab  Added Exec Sink Kamelet
     new 64094ad  Added Exec Sink Kamelet

The 6 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.


[camel-kamelets] 06/06: Added Exec Sink Kamelet

Posted by df...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dfoulks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 64094ad7b58b9e9d34adcedeb25a4a0555a940b2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 14:57:57 2021 +0200

    Added Exec Sink Kamelet
---
 docs/modules/ROOT/pages/exec-sink.adoc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/docs/modules/ROOT/pages/exec-sink.adoc b/docs/modules/ROOT/pages/exec-sink.adoc
index 68531da..0b7defa 100644
--- a/docs/modules/ROOT/pages/exec-sink.adoc
+++ b/docs/modules/ROOT/pages/exec-sink.adoc
@@ -5,13 +5,18 @@
 
 Execute system commands
 
+The Kamelet expects the following headers to be set:
+
+- `args/ `ce-args`: as the args to be set on the executable.
+
+If the header won't be set the executable will be run without arguments.
+
 == Configuration Options
 
 The following table summarizes the configuration options available for the `exec-sink` Kamelet:
 [width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
 |===
 | Property| Name| Description| Type| Default| Example
-| *args {empty}* *| The arguments| Arguments to pass to the executables| string| | 
 | *executable {empty}* *| Executable command| The command to execute| string| | 
 |===
 
@@ -44,7 +49,6 @@ spec:
       apiVersion: camel.apache.org/v1alpha1
       name: exec-sink
     properties:
-      args: "The The arguments"
       executable: "The Executable command"
 
 ----

[camel-kamelets] 03/06: Added Exec Sink Kamelet

Posted by df...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dfoulks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 2654193e08c97a81613cf7f58b94c1c975f10093
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 14:49:00 2021 +0200

    Added Exec Sink Kamelet
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index e71cb1f..ae933ff 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -21,6 +21,7 @@
 * xref:ROOT:dropbox-sink.adoc[image:kamelets/dropbox-sink.svg[] Dropbox Sink]
 * xref:ROOT:dropbox-source.adoc[image:kamelets/dropbox-source.svg[] Dropbox Source]
 * xref:ROOT:earthquake-source.adoc[image:kamelets/earthquake-source.svg[] Earthquake Source]
+* xref:ROOT:exec-sink.adoc[image:kamelets/exec-sink.svg[] Exec Sink]
 * xref:ROOT:fhir-source.adoc[image:kamelets/fhir-source.svg[] Fhir Source]
 * xref:ROOT:file-watch-source.adoc[image:kamelets/file-watch-source.svg[] File Watch Source]
 * xref:ROOT:ftp-source.adoc[image:kamelets/ftp-source.svg[] FTP Source]

[camel-kamelets] 02/06: Added Exec Sink Kamelet

Posted by df...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dfoulks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 50d921adfac832a7e18bb415ada1c0e6b0a6aea0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 14:43:56 2021 +0200

    Added Exec Sink Kamelet
---
 exec-sink.kamelet.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec-sink.kamelet.yaml b/exec-sink.kamelet.yaml
index 6236f92..bafa104 100644
--- a/exec-sink.kamelet.yaml
+++ b/exec-sink.kamelet.yaml
@@ -3,7 +3,7 @@ kind: Kamelet
 metadata:
   name: exec-sink
   annotations:
-    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iMTI4MC4wMDAwMDBwdCIgaGVpZ2h0PSIxMDEyLjAwMDAwMHB0IiB2aWV3Qm94PSIwIDAgMTI4MC4wMDAwMDAgMTAxMi4wMDAwMDAiCiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBtZW [...]
     camel.apache.org/provider: "Apache Software Foundation"
   labels:
     camel.apache.org/kamelet.type: sink

[camel-kamelets] 05/06: Added Exec Sink Kamelet

Posted by df...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dfoulks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 3627dabd1c3a5b02e12e5fab94828c13ca024628
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 14:57:45 2021 +0200

    Added Exec Sink Kamelet
---
 exec-sink.kamelet.yaml | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/exec-sink.kamelet.yaml b/exec-sink.kamelet.yaml
index bafa104..78bbadf 100644
--- a/exec-sink.kamelet.yaml
+++ b/exec-sink.kamelet.yaml
@@ -12,6 +12,12 @@ spec:
     title: Exec Sink
     description: |-
       Execute system commands
+
+      The Kamelet expects the following headers to be set:
+
+      - `args/ `ce-args`: as the args to be set on the executable.
+
+      If the header won't be set the executable will be run without arguments.
     required:
       - executable
       - args
@@ -20,17 +26,23 @@ spec:
         title: Executable command
         description: The command to execute
         type: string
-      args:
-        title: The arguments
-        description: Arguments to pass to the executables
-        type: string
   flow:
     from:
       uri: kamelet:source
       steps:
+      - choice:
+          when:
+          - simple: "${header[args]}"
+            steps:
+            - set-header:
+                name: CamelExecCommandArgs
+                simple: "${header[args]}"
+          - simple: "${header[ce-args]}"
+            steps:
+            - set-header:
+                name: CamelExecCommandArgs
+                simple: "${header[ce-args]}"
       - to:
           uri: "exec:{{executable}}"
-          parameters:
-            args: "{{args}}"
       - set-body:
           simple: "${body.stdout}"

[camel-kamelets] 01/06: Added Exec Sink Kamelet

Posted by df...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dfoulks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 5b0c59c9500b9a032fa582548fd25195e0748e7c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 14:40:06 2021 +0200

    Added Exec Sink Kamelet
---
 exec-sink.kamelet.yaml | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/exec-sink.kamelet.yaml b/exec-sink.kamelet.yaml
new file mode 100644
index 0000000..6236f92
--- /dev/null
+++ b/exec-sink.kamelet.yaml
@@ -0,0 +1,36 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: exec-sink
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: sink
+spec:
+  definition:
+    title: Exec Sink
+    description: |-
+      Execute system commands
+    required:
+      - executable
+      - args
+    properties:
+      executable:
+        title: Executable command
+        description: The command to execute
+        type: string
+      args:
+        title: The arguments
+        description: Arguments to pass to the executables
+        type: string
+  flow:
+    from:
+      uri: kamelet:source
+      steps:
+      - to:
+          uri: "exec:{{executable}}"
+          parameters:
+            args: "{{args}}"
+      - set-body:
+          simple: "${body.stdout}"

[camel-kamelets] 04/06: Added Exec Sink Kamelet

Posted by df...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dfoulks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 06a745b3600f6621ddf448748a2b53ef0cbe1d5f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 20 14:50:25 2021 +0200

    Added Exec Sink Kamelet
---
 .../ROOT/assets/images/kamelets/exec-sink.svg      | 29 ++++++++++
 docs/modules/ROOT/pages/exec-sink.adoc             | 62 ++++++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/exec-sink.svg b/docs/modules/ROOT/assets/images/kamelets/exec-sink.svg
new file mode 100644
index 0000000..00b5f3f
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/exec-sink.svg
@@ -0,0 +1,29 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
+ width="1280.000000pt" height="1012.000000pt" viewBox="0 0 1280.000000 1012.000000"
+ preserveAspectRatio="xMidYMid meet">
+<metadata>
+Created by potrace 1.15, written by Peter Selinger 2001-2017
+</metadata>
+<g transform="translate(0.000000,1012.000000) scale(0.100000,-0.100000)"
+fill="#000000" stroke="none">
+<path d="M8585 10114 c-16 -3 -221 -34 -455 -70 -890 -136 -1487 -227 -2125
+-324 -363 -55 -894 -136 -1180 -180 -286 -44 -817 -125 -1180 -180 -363 -55
+-896 -137 -1185 -181 -548 -83 -619 -96 -711 -135 -208 -86 -365 -237 -469
+-449 -91 -187 -107 -325 -71 -616 12 -96 57 -478 101 -849 44 -371 123 -1033
+175 -1470 52 -437 180 -1515 285 -2395 104 -880 194 -1628 200 -1663 28 -164
+129 -351 256 -473 38 -36 78 -72 89 -80 27 -18 77 -104 67 -114 -4 -5 -1 -5 7
+0 9 5 12 3 8 -6 -2 -8 9 -39 25 -69 80 -144 211 -266 371 -345 106 -52 175
+-71 305 -86 133 -15 223 -6 760 76 160 25 426 65 590 90 378 58 807 124 1180
+180 160 25 424 65 585 90 160 24 426 65 590 90 163 25 430 65 592 90 162 25
+428 65 590 90 162 25 427 65 588 90 160 24 427 65 592 90 1147 175 1156 176
+1320 254 264 125 442 365 485 649 6 37 8 166 6 287 l-3 220 -91 430 c-87 412
+-193 919 -342 1630 -38 182 -141 674 -229 1095 -88 421 -264 1262 -391 1869
+-127 607 -255 1222 -285 1365 -31 144 -67 301 -81 350 -89 310 -330 546 -642
+627 -76 20 -264 33 -327 23z m2382 -7716 c-3 -7 -5 -2 -5 12 0 14 2 19 5 13 2
+-7 2 -19 0 -25z m-8542 -1498 c10 -11 16 -20 13 -20 -3 0 -13 9 -23 20 -10 11
+-16 20 -13 20 3 0 13 -9 23 -20z"/>
+</g>
+</svg>
diff --git a/docs/modules/ROOT/pages/exec-sink.adoc b/docs/modules/ROOT/pages/exec-sink.adoc
new file mode 100644
index 0000000..68531da
--- /dev/null
+++ b/docs/modules/ROOT/pages/exec-sink.adoc
@@ -0,0 +1,62 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/exec-sink.svg[] Exec Sink
+
+*Provided by: "Apache Software Foundation"*
+
+Execute system commands
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `exec-sink` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *args {empty}* *| The arguments| Arguments to pass to the executables| string| | 
+| *executable {empty}* *| Executable command| The command to execute| string| | 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `exec-sink` can be used in various contexts.
+
+=== Knative Sink
+
+The `exec-sink` Kamelet can be used as Knative sink by binding it to a Knative object.
+
+.exec-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: exec-sink-binding
+spec:
+  source:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: exec-sink
+    properties:
+      args: "The The arguments"
+      executable: "The Executable command"
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `exec-sink-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the sink using the following command:
+
+[source,shell]
+----
+kubectl apply -f exec-sink-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT