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 2021/11/25 14:05:16 UTC

[camel-kamelets] branch infinispan-sink created (now 97e50e0)

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

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


      at 97e50e0  Added Infinispan Sink Kamelet

This branch includes the following new commits:

     new 273d1c5  Added Infinispan Sink Kamelet
     new 5642fd3  Added Infinispan Sink Kamelet
     new fa5a4b6  Added Infinispan Sink Kamelet
     new d34c500  Added Infinispan Sink Kamelet
     new 9330e21  Added Infinispan Sink Kamelet
     new 97e50e0  Added Infinispan 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] 02/06: Added Infinispan Sink Kamelet

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

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

commit 5642fd35eb87b0d5f3bf578d12091923717c8410
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 25 14:42:14 2021 +0100

    Added Infinispan Sink Kamelet
---
 .../kamelets/infinispan-sink.kamelet.yaml          | 115 +++++++++++++++++++++
 1 file changed, 115 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/infinispan-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/infinispan-sink.kamelet.yaml
new file mode 100644
index 0000000..e801d59
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/infinispan-sink.kamelet.yaml
@@ -0,0 +1,115 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: infinispan-sink
+  labels:
+    camel.apache.org/kamelet.type: "source"
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Infinispan"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBpZD0iYXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAyNCAyMTUiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojMGIyNTQ1O30uY2xzLTJ7ZmlsbDojNTk5ZmM2O308L3N0eWxlPjwvZGVmcz48cmVjdCBjbGFzcz0iY2xzLTEiIHg9IjI5Ny4yNCIgeT0iMS45OCIgd2lkdGg9IjExLjkiIGhlaWdodD0iMTU4LjEyIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMzk1LjI1LDY0Ljg4Yy03LjgxLTkuNDUtMTguOS0xNC4yNC0zMy0xNC4yNC0xMy43NywwLTI0LjczLDQuNzUtMzIuNjQsMTQuMTFWNTIuMzlIMz [...]
+spec:
+  definition:
+    title: "Infinispan Sink"
+    description: |-
+      Write object to an Infinispan cache.
+
+      The Kamelet expects the following headers to be set:
+
+      - `key` / `ce-key`: as the key to use when put an object in the Infinispan cache.
+
+      If the header won't be set the exchange ID will be used as key.
+    required:
+      - cacheName
+      - hosts
+      - username
+      - password
+    type: object
+    properties:
+      cacheName:
+        title: Cache Name
+        description: The name of the Infinispan cache to use
+        type: String
+      hosts:
+        title: Hosts
+        description: Specifies the host of the cache on Infinispan instance
+        type: String
+      secure:
+        title: Secure
+        description: If the Infinispan instance is secured or not
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      username:
+        title: Username
+        description: Username to connect to Infinispan.
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: Password to connect to Infinispan.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      saslMechanism:
+        title: SASL Mechanism
+        description: The SASL Mechanism to use
+        type: String
+        default: "DIGEST-MD5"
+      securityRealm:
+        title: Security Realm
+        description: Define the security realm to access the infinispan instance
+        type: string
+        default: "default"
+      securityServerName:
+        title: Security Server name
+        description: Define the security server name to access the infinispan instance
+        type: string
+        default: "infinispan"
+  dependencies:
+    - "camel:kamelet"
+    - "camel:core"
+    - "camel:infinispan"
+  flow:
+    beans:
+      - name: local-infinispan
+        type: "#class:org.apache.camel.component.infinispan.remote.InfinispanRemoteComponent"
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          when:
+          - simple: "${header[key]}"
+            steps:
+            - set-header:
+                name: CamelInfinispanKey
+                simple: "${header[key]}"
+          - simple: "${header[ce-key]}"
+            steps:
+            - set-header:
+                name: CamelInfinispanKey
+                simple: "${header[ce-key]}"
+          otherwise:
+            steps:
+            - set-header:
+                name: CamelInfinispanKey
+                simple: "${exchangeId}"
+      - set-header:
+          name: CamelInfinispanValue
+          simple: "${body}"
+      - to:
+          uri: "{{local-infinispan}}:{{cacheName}}"
+          parameters:
+            hosts: "{{hosts}}"
+            secure: "{{secure}}"
+            username: "{{username}}"
+            password: "{{password}}"
+            saslMechanism: "{{saslMechanism}}"
+            securityRealm: "{{securityRealm}}"
+            securityServerName: "{{securityServerName}}"

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

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

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

commit d34c5005e4752fa800483cd2b14dae7560788368
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 25 15:01:30 2021 +0100

    Added Infinispan Sink Kamelet
---
 kamelets/infinispan-sink.kamelet.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kamelets/infinispan-sink.kamelet.yaml b/kamelets/infinispan-sink.kamelet.yaml
index e801d59..b063219 100644
--- a/kamelets/infinispan-sink.kamelet.yaml
+++ b/kamelets/infinispan-sink.kamelet.yaml
@@ -3,7 +3,7 @@ kind: Kamelet
 metadata:
   name: infinispan-sink
   labels:
-    camel.apache.org/kamelet.type: "source"
+    camel.apache.org/kamelet.type: "sink"
   annotations:
     camel.apache.org/kamelet.support.level: "Preview"
     camel.apache.org/catalog.version: "main-SNAPSHOT"

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

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

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

commit 97e50e0d75838e884159192537fad534108ed9c6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 25 15:04:01 2021 +0100

    Added Infinispan Sink Kamelet
---
 docs/modules/ROOT/pages/infinispan-sink.adoc       | 40 +++++++++++-----------
 .../bindings/camel-k/infinispan-sink-binding.yaml  | 10 +++---
 .../bindings/core/infinispan-sink-binding.yaml     | 15 ++++----
 3 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/docs/modules/ROOT/pages/infinispan-sink.adoc b/docs/modules/ROOT/pages/infinispan-sink.adoc
index e471a21..cfdadf5 100644
--- a/docs/modules/ROOT/pages/infinispan-sink.adoc
+++ b/docs/modules/ROOT/pages/infinispan-sink.adoc
@@ -45,9 +45,9 @@ At runtime, the `infinispan-sink` Kamelet relies upon the presence of the follow
 
 This section describes how you can use the `infinispan-sink`.
 
-=== Knative Source
+=== Knative Sink
 
-You can use the `infinispan-sink` Kamelet as a Knative source by binding it to a Knative object.
+You can use the `infinispan-sink` Kamelet as a Knative sink by binding it to a Knative object.
 
 .infinispan-sink-binding.yaml
 [source,yaml]
@@ -59,6 +59,11 @@ metadata:
 spec:
   source:
     ref:
+      kind: Channel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  sink:
+    ref:
       kind: Kamelet
       apiVersion: camel.apache.org/v1alpha1
       name: infinispan-sink
@@ -67,11 +72,6 @@ spec:
       hosts: "The Hosts"
       password: "The Password"
       username: "The Username"
-  sink:
-    ref:
-      kind: Channel
-      apiVersion: messaging.knative.dev/v1
-      name: mychannel
   
 ----
 
@@ -83,7 +83,7 @@ You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K
 
 . Save the `infinispan-sink-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
 
-. Run the source by using the following command:
+. Run the sink by using the following command:
 +
 [source,shell]
 ----
@@ -92,18 +92,18 @@ kubectl apply -f infinispan-sink-binding.yaml
 
 ==== *Procedure for using the Kamel CLI*
 
-Configure and run the source by using the following command:
+Configure and run the sink by using the following command:
 
 [source,shell]
 ----
-kamel bind infinispan-sink -p "source.cacheName=The Cache Name" -p "source.hosts=The Hosts" -p "source.password=The Password" -p "source.username=The Username" channel:mychannel
+kamel bind channel:mychannel infinispan-sink -p "sink.cacheName=The Cache Name" -p "sink.hosts=The Hosts" -p "sink.password=The Password" -p "sink.username=The Username"
 ----
 
 This command creates the KameletBinding in the current namespace on the cluster.
 
-=== Kafka Source
+=== Kafka Sink
 
-You can use the `infinispan-sink` Kamelet as a Kafka source by binding it to a Kafka topic.
+You can use the `infinispan-sink` Kamelet as a Kafka sink by binding it to a Kafka topic.
 
 .infinispan-sink-binding.yaml
 [source,yaml]
@@ -115,6 +115,11 @@ metadata:
 spec:
   source:
     ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  sink:
+    ref:
       kind: Kamelet
       apiVersion: camel.apache.org/v1alpha1
       name: infinispan-sink
@@ -123,11 +128,6 @@ spec:
       hosts: "The Hosts"
       password: "The Password"
       username: "The Username"
-  sink:
-    ref:
-      kind: KafkaTopic
-      apiVersion: kafka.strimzi.io/v1beta1
-      name: my-topic
   
 ----
 
@@ -141,7 +141,7 @@ spec:
 
 . Save the `infinispan-sink-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
 
-. Run the source by using the following command:
+. Run the sink by using the following command:
 +
 [source,shell]
 ----
@@ -150,11 +150,11 @@ kubectl apply -f infinispan-sink-binding.yaml
 
 ==== *Procedure for using the Kamel CLI*
 
-Configure and run the source by using the following command:
+Configure and run the sink by using the following command:
 
 [source,shell]
 ----
-kamel bind infinispan-sink -p "source.cacheName=The Cache Name" -p "source.hosts=The Hosts" -p "source.password=The Password" -p "source.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic infinispan-sink -p "sink.cacheName=The Cache Name" -p "sink.hosts=The Hosts" -p "sink.password=The Password" -p "sink.username=The Username"
 ----
 
 This command creates the KameletBinding in the current namespace on the cluster.
diff --git a/templates/bindings/camel-k/infinispan-sink-binding.yaml b/templates/bindings/camel-k/infinispan-sink-binding.yaml
index b949014..075417f 100644
--- a/templates/bindings/camel-k/infinispan-sink-binding.yaml
+++ b/templates/bindings/camel-k/infinispan-sink-binding.yaml
@@ -5,6 +5,11 @@ metadata:
 spec:
   source:
     ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  sink:
+    ref:
       kind: Kamelet
       apiVersion: camel.apache.org/v1alpha1
       name: infinispan-sink
@@ -13,9 +18,4 @@ spec:
       hosts: "The Hosts"
       password: "The Password"
       username: "The Username"
-  sink:
-    ref:
-      kind: KafkaTopic
-      apiVersion: kafka.strimzi.io/v1beta1
-      name: my-topic
   
\ No newline at end of file
diff --git a/templates/bindings/core/infinispan-sink-binding.yaml b/templates/bindings/core/infinispan-sink-binding.yaml
index 939e1dd..2b9b88e 100644
--- a/templates/bindings/core/infinispan-sink-binding.yaml
+++ b/templates/bindings/core/infinispan-sink-binding.yaml
@@ -1,12 +1,15 @@
 - route:
     from:
-      uri: "kamelet:infinispan-sink"
+      uri: "kamelet:timer-source"
       parameters:
-        cacheName: "The Cache Name"
-        hosts: "The Hosts"
-        password: "The Password"
-        username: "The Username"
+        period: 1000
+        message: "Hello Camel JBang"
     steps:
       - to:
-          uri: "log:info"
+          uri: "kamelet:infinispan-sink"
+          parameters:
+            cacheName: "The Cache Name"
+            hosts: "The Hosts"
+            password: "The Password"
+            username: "The Username"
     
\ No newline at end of file

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

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

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

commit fa5a4b67c8bdefea16897de14a712ffd0086fe0e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 25 15:00:16 2021 +0100

    Added Infinispan Sink Kamelet
---
 .../assets/images/kamelets/infinispan-sink.svg     |   1 +
 docs/modules/ROOT/nav.adoc                         |   1 +
 docs/modules/ROOT/pages/infinispan-sink.adoc       | 166 +++++++++++++++++++++
 .../bindings/camel-k/infinispan-sink-binding.yaml  |  21 +++
 .../bindings/core/infinispan-sink-binding.yaml     |  12 ++
 5 files changed, 201 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/infinispan-sink.svg b/docs/modules/ROOT/assets/images/kamelets/infinispan-sink.svg
new file mode 100644
index 0000000..8ebac47
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/infinispan-sink.svg
@@ -0,0 +1 @@
+<svg id="artwork" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 215"><defs><style>.cls-1{fill:#0b2545;}.cls-2{fill:#599fc6;}</style></defs><rect class="cls-1" x="297.24" y="1.98" width="11.9" height="158.12"/><path class="cls-1" d="M395.25,64.88c-7.81-9.45-18.9-14.24-33-14.24-13.77,0-24.73,4.75-32.64,14.11V52.39H318.27v107.7h11.37V94.18c0-10,3-18.08,8.82-24.05s13.87-9,23.82-9,18.1,3.46,24.1,10.28c5.74,6.51,8.65,15,8.65,25.18v63.49h11.14V99.43C406.17,85.15,402.49,73.52,395.25,64.88 [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 64d1840..4e3bd0c 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -63,6 +63,7 @@
 * xref:ROOT:http-secured-source.adoc[image:kamelets/http-secured-source.svg[] HTTP Secured Source]
 * xref:ROOT:http-sink.adoc[image:kamelets/http-sink.svg[] HTTP Sink]
 * xref:ROOT:http-source.adoc[image:kamelets/http-source.svg[] HTTP Source]
+* xref:ROOT:infinispan-sink.adoc[image:kamelets/infinispan-sink.svg[] Infinispan Sink]
 * xref:ROOT:infinispan-source.adoc[image:kamelets/infinispan-source.svg[] Infinispan Source]
 * xref:ROOT:insert-field-action.adoc[image:kamelets/insert-field-action.svg[] Insert Field Action]
 * xref:ROOT:insert-header-action.adoc[image:kamelets/insert-header-action.svg[] Insert Header Action]
diff --git a/docs/modules/ROOT/pages/infinispan-sink.adoc b/docs/modules/ROOT/pages/infinispan-sink.adoc
new file mode 100644
index 0000000..e471a21
--- /dev/null
+++ b/docs/modules/ROOT/pages/infinispan-sink.adoc
@@ -0,0 +1,166 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+
+= image:kamelets/infinispan-sink.svg[] Infinispan Sink
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Write object to an Infinispan cache.
+
+The Kamelet expects the following headers to be set:
+
+- `key` / `ce-key`: as the key to use when put an object in the Infinispan cache.
+
+If the header won't be set the exchange ID will be used as key.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `infinispan-sink` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *cacheName {empty}* *| Cache Name| The name of the Infinispan cache to use| String| | 
+| *hosts {empty}* *| Hosts| Specifies the host of the cache on Infinispan instance| String| | 
+| *password {empty}* *| Password| Password to connect to Infinispan.| string| | 
+| *username {empty}* *| Username| Username to connect to Infinispan.| string| | 
+| saslMechanism| SASL Mechanism| The SASL Mechanism to use| String| `"DIGEST-MD5"`| 
+| secure| Secure| If the Infinispan instance is secured or not| boolean| `true`| 
+| securityRealm| Security Realm| Define the security realm to access the infinispan instance| string| `"default"`| 
+| securityServerName| Security Server name| Define the security server name to access the infinispan instance| string| `"infinispan"`| 
+|===
+
+NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
+
+
+== Dependencies
+
+At runtime, the `infinispan-sink` Kamelet relies upon the presence of the following dependencies:
+
+- camel:kamelet
+- camel:core
+- camel:infinispan 
+
+== Usage
+
+This section describes how you can use the `infinispan-sink`.
+
+=== Knative Source
+
+You can use the `infinispan-sink` Kamelet as a Knative source by binding it to a Knative object.
+
+.infinispan-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: infinispan-sink-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: infinispan-sink
+    properties:
+      cacheName: "The Cache Name"
+      hosts: "The Hosts"
+      password: "The Password"
+      username: "The Username"
+  sink:
+    ref:
+      kind: Channel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  
+----
+
+==== *Prerequisite*
+
+You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `infinispan-sink-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f infinispan-sink-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind infinispan-sink -p "source.cacheName=The Cache Name" -p "source.hosts=The Hosts" -p "source.password=The Password" -p "source.username=The Username" channel:mychannel
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+=== Kafka Source
+
+You can use the `infinispan-sink` Kamelet as a Kafka source by binding it to a Kafka topic.
+
+.infinispan-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: infinispan-sink-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: infinispan-sink
+    properties:
+      cacheName: "The Cache Name"
+      hosts: "The Hosts"
+      password: "The Password"
+      username: "The Username"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
+----
+
+==== *Prerequisites*
+
+* You've installed https://strimzi.io/[Strimzi].
+* You've created a topic named `my-topic` in the current namespace.
+* You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `infinispan-sink-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f infinispan-sink-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind infinispan-sink -p "source.cacheName=The Cache Name" -p "source.hosts=The Hosts" -p "source.password=The Password" -p "source.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+== Kamelet source file
+
+https://github.com/apache/camel-kamelets/blob/main/infinispan-sink.kamelet.yaml
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
diff --git a/templates/bindings/camel-k/infinispan-sink-binding.yaml b/templates/bindings/camel-k/infinispan-sink-binding.yaml
new file mode 100644
index 0000000..b949014
--- /dev/null
+++ b/templates/bindings/camel-k/infinispan-sink-binding.yaml
@@ -0,0 +1,21 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: infinispan-sink-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: infinispan-sink
+    properties:
+      cacheName: "The Cache Name"
+      hosts: "The Hosts"
+      password: "The Password"
+      username: "The Username"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
\ No newline at end of file
diff --git a/templates/bindings/core/infinispan-sink-binding.yaml b/templates/bindings/core/infinispan-sink-binding.yaml
new file mode 100644
index 0000000..939e1dd
--- /dev/null
+++ b/templates/bindings/core/infinispan-sink-binding.yaml
@@ -0,0 +1,12 @@
+- route:
+    from:
+      uri: "kamelet:infinispan-sink"
+      parameters:
+        cacheName: "The Cache Name"
+        hosts: "The Hosts"
+        password: "The Password"
+        username: "The Username"
+    steps:
+      - to:
+          uri: "log:info"
+    
\ No newline at end of file

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

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

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

commit 273d1c5a7645b87eabf9dd69d84fd5469229ec36
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 25 14:29:28 2021 +0100

    Added Infinispan Sink Kamelet
---
 kamelets/infinispan-sink.kamelet.yaml | 115 ++++++++++++++++++++++++++++++++++
 1 file changed, 115 insertions(+)

diff --git a/kamelets/infinispan-sink.kamelet.yaml b/kamelets/infinispan-sink.kamelet.yaml
new file mode 100644
index 0000000..e801d59
--- /dev/null
+++ b/kamelets/infinispan-sink.kamelet.yaml
@@ -0,0 +1,115 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: infinispan-sink
+  labels:
+    camel.apache.org/kamelet.type: "source"
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Infinispan"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBpZD0iYXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAyNCAyMTUiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojMGIyNTQ1O30uY2xzLTJ7ZmlsbDojNTk5ZmM2O308L3N0eWxlPjwvZGVmcz48cmVjdCBjbGFzcz0iY2xzLTEiIHg9IjI5Ny4yNCIgeT0iMS45OCIgd2lkdGg9IjExLjkiIGhlaWdodD0iMTU4LjEyIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMzk1LjI1LDY0Ljg4Yy03LjgxLTkuNDUtMTguOS0xNC4yNC0zMy0xNC4yNC0xMy43NywwLTI0LjczLDQuNzUtMzIuNjQsMTQuMTFWNTIuMzlIMz [...]
+spec:
+  definition:
+    title: "Infinispan Sink"
+    description: |-
+      Write object to an Infinispan cache.
+
+      The Kamelet expects the following headers to be set:
+
+      - `key` / `ce-key`: as the key to use when put an object in the Infinispan cache.
+
+      If the header won't be set the exchange ID will be used as key.
+    required:
+      - cacheName
+      - hosts
+      - username
+      - password
+    type: object
+    properties:
+      cacheName:
+        title: Cache Name
+        description: The name of the Infinispan cache to use
+        type: String
+      hosts:
+        title: Hosts
+        description: Specifies the host of the cache on Infinispan instance
+        type: String
+      secure:
+        title: Secure
+        description: If the Infinispan instance is secured or not
+        type: boolean
+        default: true
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+      username:
+        title: Username
+        description: Username to connect to Infinispan.
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: Password to connect to Infinispan.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      saslMechanism:
+        title: SASL Mechanism
+        description: The SASL Mechanism to use
+        type: String
+        default: "DIGEST-MD5"
+      securityRealm:
+        title: Security Realm
+        description: Define the security realm to access the infinispan instance
+        type: string
+        default: "default"
+      securityServerName:
+        title: Security Server name
+        description: Define the security server name to access the infinispan instance
+        type: string
+        default: "infinispan"
+  dependencies:
+    - "camel:kamelet"
+    - "camel:core"
+    - "camel:infinispan"
+  flow:
+    beans:
+      - name: local-infinispan
+        type: "#class:org.apache.camel.component.infinispan.remote.InfinispanRemoteComponent"
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          when:
+          - simple: "${header[key]}"
+            steps:
+            - set-header:
+                name: CamelInfinispanKey
+                simple: "${header[key]}"
+          - simple: "${header[ce-key]}"
+            steps:
+            - set-header:
+                name: CamelInfinispanKey
+                simple: "${header[ce-key]}"
+          otherwise:
+            steps:
+            - set-header:
+                name: CamelInfinispanKey
+                simple: "${exchangeId}"
+      - set-header:
+          name: CamelInfinispanValue
+          simple: "${body}"
+      - to:
+          uri: "{{local-infinispan}}:{{cacheName}}"
+          parameters:
+            hosts: "{{hosts}}"
+            secure: "{{secure}}"
+            username: "{{username}}"
+            password: "{{password}}"
+            saslMechanism: "{{saslMechanism}}"
+            securityRealm: "{{securityRealm}}"
+            securityServerName: "{{securityServerName}}"

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

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

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

commit 9330e21cd860d5c3ca0f7828eebb08cd71b62331
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 25 15:03:38 2021 +0100

    Added Infinispan Sink Kamelet
---
 .../src/main/resources/kamelets/infinispan-sink.kamelet.yaml            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/infinispan-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/infinispan-sink.kamelet.yaml
index e801d59..b063219 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/infinispan-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/infinispan-sink.kamelet.yaml
@@ -3,7 +3,7 @@ kind: Kamelet
 metadata:
   name: infinispan-sink
   labels:
-    camel.apache.org/kamelet.type: "source"
+    camel.apache.org/kamelet.type: "sink"
   annotations:
     camel.apache.org/kamelet.support.level: "Preview"
     camel.apache.org/catalog.version: "main-SNAPSHOT"