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/12/16 13:14:27 UTC

[camel-kamelets] 04/05: Added Google Storage Sink Kamelet - Docs

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

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

commit 14967bb13c42165abe6f99f09077ae755ae0a8d5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 16 14:13:06 2021 +0100

    Added Google Storage Sink Kamelet - Docs
---
 .../assets/images/kamelets/google-storage-sink.svg |   1 +
 docs/modules/ROOT/pages/google-storage-sink.adoc   | 157 +++++++++++++++++++++
 2 files changed, 158 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/google-storage-sink.svg b/docs/modules/ROOT/assets/images/kamelets/google-storage-sink.svg
new file mode 100644
index 0000000..d30e003
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/google-storage-sink.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="800" width="1200" viewBox="-19.20015 -28.483 166.4013 170.898"><g transform="translate(0 -7.034)"><linearGradient y2="120.789" x2="64" y1="7.034" x1="64" gradientUnits="userSpaceOnUse" id="a"><stop offset="0" stop-color="#4387fd"/><stop offset="1" stop-color="#4683ea"/></linearGradient><path d="M27.79 115.217L1.54 69.749a11.499 11.499 0 010-11.499l26.25-45.467a11.5 11.5 0 019.96-5.75h52.5a11.5 11.5 [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/google-storage-sink.adoc b/docs/modules/ROOT/pages/google-storage-sink.adoc
new file mode 100644
index 0000000..f36cd84
--- /dev/null
+++ b/docs/modules/ROOT/pages/google-storage-sink.adoc
@@ -0,0 +1,157 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+
+= image:kamelets/google-storage-sink.svg[] Google Storage Sink
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Upload Objects to Google Storage.
+
+The serviceAccountKey property needs to be encoded in base64, so when you pass it as parameter, don't forget to encode it.
+
+- `file` / `ce-file`: as the file name to upload
+
+If the header won't be set the exchange ID will be used as file name.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `google-storage-sink` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *bucketNameOrArn {empty}* *| Bucket Name Or ARN| The Bucket Name or Bucket ARN| string| | 
+| *serviceAccountKey {empty}* *| Service Account Key| The Service account key that can be used as credentials for the Google Cloud Storage access.| binary| | 
+| autoCreateBucket| Autocreate Bucket| Setting the autocreation of the Google Cloud Storage bucket bucketNameOrArn.| boolean| `false`| 
+|===
+
+NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
+
+
+== Dependencies
+
+At runtime, the `google-storage-sink` Kamelet relies upon the presence of the following dependencies:
+
+- camel:kamelet
+- camel:google-storage
+- camel:jackson 
+
+== Usage
+
+This section describes how you can use the `google-storage-sink`.
+
+=== Knative Sink
+
+You can use the `google-storage-sink` Kamelet as a Knative sink by binding it to a Knative object.
+
+.google-storage-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: google-storage-sink-binding
+spec:
+  source:
+    ref:
+      kind: Channel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: google-storage-sink
+    properties:
+      bucketNameOrArn: "The Bucket Name Or ARN"
+      serviceAccountKey: "The Service Account Key"
+  
+----
+
+==== *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 `google-storage-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 google-storage-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 google-storage-sink -p "sink.bucketNameOrArn=The Bucket Name Or ARN" -p "sink.serviceAccountKey=The Service Account Key"
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+=== Kafka Sink
+
+You can use the `google-storage-sink` Kamelet as a Kafka sink by binding it to a Kafka topic.
+
+.google-storage-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: google-storage-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: google-storage-sink
+    properties:
+      bucketNameOrArn: "The Bucket Name Or ARN"
+      serviceAccountKey: "The Service Account Key"
+  
+----
+
+==== *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 `google-storage-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 google-storage-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 google-storage-sink -p "sink.bucketNameOrArn=The Bucket Name Or ARN" -p "sink.serviceAccountKey=The Service Account Key"
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+== Kamelet source file
+
+https://github.com/apache/camel-kamelets/blob/main/kamelets/google-storage-sink.kamelet.yaml
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT