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

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

commit 035dbd04f6749a7bfe5e88c52ea02c17d15d7466
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Nov 10 13:30:58 2021 +0100

    Added Couchbase Sink Kamelet
---
 .../ROOT/assets/images/kamelets/couchbase-sink.svg |   1 +
 docs/modules/ROOT/pages/couchbase-sink.adoc        | 157 +++++++++++++++++++++
 .../bindings/camel-k/couchbase-sink-binding.yaml   |  20 +++
 .../bindings/core/couchbase-sink-binding.yaml      |  14 ++
 4 files changed, 192 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/couchbase-sink.svg 
b/docs/modules/ROOT/assets/images/kamelets/couchbase-sink.svg
new file mode 100644
index 0000000..ac47508
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/couchbase-sink.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; viewBox="0 0 68.343 68.343" 
fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" 
stroke-linejoin="round"><use xlink:href="#A" x="2.171" y="2.171"/><symbol 
id="A" overflow="visible"><path d="M32.002 0C14.331.002.005 14.326 0 
31.998c.005 17.67 14.328 31.993 31.998 31.998 17.67-.005 31.993-14.328 
31.998-31.998C63.991 14.33 49.67.007 32.002 0zm21.606 37.609c0 1.933-1.112 
3.626-3.288 4.013-3.77. [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/couchbase-sink.adoc 
b/docs/modules/ROOT/pages/couchbase-sink.adoc
new file mode 100644
index 0000000..6644d33
--- /dev/null
+++ b/docs/modules/ROOT/pages/couchbase-sink.adoc
@@ -0,0 +1,157 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+
+= image:kamelets/couchbase-sink.svg[] Couchbase Sink
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Send documents to Couchbase.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the 
`couchbase-sink` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *bucket {empty}* *| Bucket| The bucket to use| string| | 
+| *hostname {empty}* *| Hostname| The hostname to use| string| | 
+| *protocol {empty}* *| Protocol| The protocol to use| string| | 
+| autoStartId| Auto Start Id| Auto Start Id or not| boolean| `true`| 
+| password| Password| Password to connect to Couchbase.| string| | 
+| port| Port| The port to use| int| `8091`| 
+| startingId| Starting Id| The starting id| long| `1`| 
+| username| Username| Username to connect to Couchbase.| string| | 
+|===
+
+NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
+
+
+== Dependencies
+
+At runtime, the `couchbase-sink Kamelet relies upon the presence of the 
following dependencies:
+
+- camel:couchbase
+- camel:kamelet 
+
+== Usage
+
+This section describes how you can use the `couchbase-sink`.
+
+=== Knative Sink
+
+You can use the `couchbase-sink` Kamelet as a Knative sink by binding it to a 
Knative object.
+
+.couchbase-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: couchbase-sink-binding
+spec:
+  source:
+    ref:
+      kind: Channel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: couchbase-sink
+    properties:
+      bucket: "The Bucket"
+      hostname: "The Hostname"
+      protocol: "The Protocol"
+  
+----
+
+==== *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 `couchbase-sink-binding.yaml` file to your local drive, and then 
edit it as needed for your configuration.
+
+. Run the sink by using the following command:
++
+[source,shell]
+----
+kubectl apply -f couchbase-sink-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the sink by using the following command:
+
+[source,shell]
+----
+kamel bind channel:mychannel couchbase-sink -p "sink.bucket=The Bucket" -p 
"sink.hostname=The Hostname" -p "sink.protocol=The Protocol"
+----
+
+This command creates the KameletBinding in the current namespace on the 
cluster.
+
+=== Kafka Sink
+
+You can use the `couchbase-sink` Kamelet as a Kafka sink by binding it to a 
Kafka topic.
+
+.couchbase-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: couchbase-sink-binding
+spec:
+  source:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: couchbase-sink
+    properties:
+      bucket: "The Bucket"
+      hostname: "The Hostname"
+      protocol: "The Protocol"
+  
+----
+
+==== *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 `couchbase-sink-binding.yaml` file to your local drive, and then 
edit it as needed for your configuration.
+
+. Run the sink by using the following command:
++
+[source,shell]
+----
+kubectl apply -f couchbase-sink-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the sink by using the following command:
+
+[source,shell]
+----
+kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic couchbase-sink -p 
"sink.bucket=The Bucket" -p "sink.hostname=The Hostname" -p "sink.protocol=The 
Protocol"
+----
+
+This command creates the KameletBinding in the current namespace on the 
cluster.
+
+== Kamelet source file
+
+https://github.com/apache/camel-kamelets/blob/main/couchbase-sink.kamelet.yaml
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
diff --git a/templates/bindings/camel-k/couchbase-sink-binding.yaml 
b/templates/bindings/camel-k/couchbase-sink-binding.yaml
new file mode 100644
index 0000000..e4ea102
--- /dev/null
+++ b/templates/bindings/camel-k/couchbase-sink-binding.yaml
@@ -0,0 +1,20 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: couchbase-sink-binding
+spec:
+  source:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: couchbase-sink
+    properties:
+      bucket: "The Bucket"
+      hostname: "The Hostname"
+      protocol: "The Protocol"
+  
\ No newline at end of file
diff --git a/templates/bindings/core/couchbase-sink-binding.yaml 
b/templates/bindings/core/couchbase-sink-binding.yaml
new file mode 100644
index 0000000..3977405
--- /dev/null
+++ b/templates/bindings/core/couchbase-sink-binding.yaml
@@ -0,0 +1,14 @@
+- route:
+    from:
+      uri: "kamelet:timer-source"
+      parameters:
+        period: 1000
+        message: "Hello Camel JBang"
+    steps:
+      - to:
+          uri: "kamelet:couchbase-sink"
+          parameters:
+            bucket: "The Bucket"
+            hostname: "The Hostname"
+            protocol: "The Protocol"
+    
\ No newline at end of file

Reply via email to