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/09/08 13:34:07 UTC
[camel-kamelets] branch google-pubsub-sink created (now 37f1311)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch google-pubsub-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.
at 37f1311 Added Google Pubsub Sink Kamelet
This branch includes the following new commits:
new c80725d Added Google Pubsub Sink Kamelet
new a5a1f16 Added Google Pubsub Sink Kamelet
new d09be5b Added Google Pubsub Sink Kamelet
new e331bba Added Google Pubsub Sink Kamelet
new 37f1311 Added Google Pubsub Sink Kamelet
The 5 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] 05/05: Added Google Pubsub 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 google-pubsub-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 37f1311a1bd818cb62762ae044e5cc4d4558ac64
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 8 15:32:52 2021 +0200
Added Google Pubsub Sink Kamelet
---
.../bindings/camel-k/google-pubsub-sink-binding.yaml | 20 ++++++++++++++++++++
.../bindings/core/google-pubsub-sink-binding.yaml | 14 ++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/templates/bindings/camel-k/google-pubsub-sink-binding.yaml b/templates/bindings/camel-k/google-pubsub-sink-binding.yaml
new file mode 100644
index 0000000..19bbc40
--- /dev/null
+++ b/templates/bindings/camel-k/google-pubsub-sink-binding.yaml
@@ -0,0 +1,20 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+ name: google-pubsub-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-pubsub-sink
+ properties:
+ destinationName: "The Destination Name"
+ projectId: "The Project Id"
+ serviceAccountKey: "The Service Account Key"
+
\ No newline at end of file
diff --git a/templates/bindings/core/google-pubsub-sink-binding.yaml b/templates/bindings/core/google-pubsub-sink-binding.yaml
new file mode 100644
index 0000000..9dbdfe5
--- /dev/null
+++ b/templates/bindings/core/google-pubsub-sink-binding.yaml
@@ -0,0 +1,14 @@
+- route:
+ from:
+ uri: "kamelet:timer-source"
+ parameters:
+ period: 1000
+ message: "Hello Camel JBang"
+ steps:
+ - to:
+ uri: "kamelet:google-pubsub-sink"
+ parameters:
+ destinationName: "The Destination Name"
+ projectId: "The Project Id"
+ serviceAccountKey: "The Service Account Key"
+
\ No newline at end of file
[camel-kamelets] 04/05: Added Google Pubsub 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 google-pubsub-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit e331bba8c912f00e4d820cdd587fa1251c9a4add
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 8 15:32:45 2021 +0200
Added Google Pubsub Sink Kamelet
---
.../assets/images/kamelets/google-pubsub-sink.svg | 1 +
docs/modules/ROOT/pages/google-pubsub-sink.adoc | 131 +++++++++++++++++++++
2 files changed, 132 insertions(+)
diff --git a/docs/modules/ROOT/assets/images/kamelets/google-pubsub-sink.svg b/docs/modules/ROOT/assets/images/kamelets/google-pubsub-sink.svg
new file mode 100644
index 0000000..449dd6e
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/google-pubsub-sink.svg
@@ -0,0 +1 @@
+<svg height="2500" viewBox="-1.63323543 7.03260933 131.26574682 114.43939067" width="2500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="64" x2="64" y1="7.034" y2="120.789"><stop offset="0" stop-color="#4387fd"/><stop offset="1" stop-color="#4683ea"/></linearGradient><path d="m27.79 115.217-26.25-45.468a11.499 11.499 0 0 1 0-11.499l26.25-45.467a11.5 11.5 0 0 1 9.96-5.75h52.5a11.5 11.5 0 0 1 9.959 5. [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/google-pubsub-sink.adoc b/docs/modules/ROOT/pages/google-pubsub-sink.adoc
new file mode 100644
index 0000000..24a2ef1
--- /dev/null
+++ b/docs/modules/ROOT/pages/google-pubsub-sink.adoc
@@ -0,0 +1,131 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/google-pubsub-sink.svg[] Google Pubsub Sink
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Send messages to Google Pubsub.
+
+The serviceAccountKey property needs to be encoded in base64, so when you pass it as parameter, don't forget to encode it.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `google-pubsub-sink` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *destinationName {empty}* *| Destination Name| The Destination Name| string| |
+| *projectId {empty}* *| Project Id| The Google Cloud PubSub Project Id| string| |
+| *serviceAccountKey {empty}* *| Service Account Key| The Service account key that can be used as credentials for the PubSub publisher/subscriber| binary| |
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `google-pubsub-sink` can be used in various contexts.
+
+=== Knative Sink
+
+The `google-pubsub-sink` Kamelet can be used as Knative sink by binding it to a Knative object.
+
+.google-pubsub-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+ name: google-pubsub-sink-binding
+spec:
+ source:
+ ref:
+ kind: InMemoryChannel
+ apiVersion: messaging.knative.dev/v1
+ name: mychannel
+ sink:
+ ref:
+ kind: Kamelet
+ apiVersion: camel.apache.org/v1alpha1
+ name: google-pubsub-sink
+ properties:
+ destinationName: "The Destination Name"
+ projectId: "The Project Id"
+ serviceAccountKey: "The Service Account Key"
+
+----
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `google-pubsub-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 google-pubsub-sink-binding.yaml
+----
+
+==== *Binding to Knative using the Kamel CLI:*
+
+The procedure described above can be simplified into a single execution of the `kamel bind` command:
+
+[source,shell]
+----
+kamel bind channel/mychannel google-pubsub-sink -p "sink.destinationName=The Destination Name" -p "sink.projectId=The Project Id" -p "sink.serviceAccountKey=The Service Account Key"
+----
+
+This will create the KameletBinding under the hood and apply it to the current namespace in the cluster.
+
+=== Kafka Sink
+
+The `google-pubsub-sink` Kamelet can be used as Kafka sink by binding it to a Kafka topic.
+
+.google-pubsub-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+ name: google-pubsub-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-pubsub-sink
+ properties:
+ destinationName: "The Destination Name"
+ projectId: "The Project Id"
+ serviceAccountKey: "The Service Account Key"
+
+----
+
+Ensure that you've installed https://strimzi.io/[Strimzi] and created a topic named `my-topic` in the current namespace.
+Make also sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `google-pubsub-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 google-pubsub-sink-binding.yaml
+----
+
+==== *Binding to Kafka using the Kamel CLI:*
+
+The procedure described above can be simplified into a single execution of the `kamel bind` command:
+
+[source,shell]
+----
+kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic google-pubsub-sink -p "sink.destinationName=The Destination Name" -p "sink.projectId=The Project Id" -p "sink.serviceAccountKey=The Service Account Key"
+----
+
+This will create the KameletBinding under the hood and apply it to the current namespace in the cluster.
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
[camel-kamelets] 03/05: Added Google Pubsub 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 google-pubsub-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit d09be5b576d4b99f411ac6b7662d5a20560e0bfb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 8 15:32:38 2021 +0200
Added Google Pubsub 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 3d76a0b..a46ce18 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -52,6 +52,7 @@
* xref:ROOT:github-source.adoc[image:kamelets/github-source.svg[] Github Source]
* xref:ROOT:google-calendar-source.adoc[image:kamelets/google-calendar-source.svg[] Google Calendar Source]
* xref:ROOT:google-mail-source.adoc[image:kamelets/google-mail-source.svg[] Google Mail Source]
+* xref:ROOT:google-pubsub-sink.adoc[image:kamelets/google-pubsub-sink.svg[] Google Pubsub Sink]
* xref:ROOT:google-pubsub-source.adoc[image:kamelets/google-pubsub-source.svg[] Google Pubsub Source]
* xref:ROOT:google-sheets-source.adoc[image:kamelets/google-sheets-source.svg[] Google Sheets Source]
* xref:ROOT:has-header-filter-action.adoc[image:kamelets/has-header-filter-action.svg[] Has Header Filter Action]
[camel-kamelets] 02/05: Added Google Pubsub 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 google-pubsub-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit a5a1f16dcae4ac84524226a4fb9795ef3869a67c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 8 15:32:21 2021 +0200
Added Google Pubsub Sink Kamelet
---
.../kamelets/google-pubsub-sink.kamelet.yaml | 49 ++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/library/camel-kamelets/src/main/resources/kamelets/google-pubsub-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/google-pubsub-sink.kamelet.yaml
new file mode 100644
index 0000000..398b35f
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/google-pubsub-sink.kamelet.yaml
@@ -0,0 +1,49 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: google-pubsub-sink
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9Ii0xLjYzMzIzNTQzIDcuMDMyNjA5MzMgMTMxLjI2NTc0NjgyIDExNC40MzkzOTA2NyIgd2lkdGg9IjI1MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI2NCIgeDI9IjY0IiB5MT0iNy4wMzQiIHkyPSIxMjAuNzg5Ij48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM0Mzg3ZmQiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3 [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Google Pubsub"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "Google Pubsub Sink"
+ description: |-
+ Send messages to Google Pubsub.
+
+ The serviceAccountKey property needs to be encoded in base64, so when you pass it as parameter, don't forget to encode it.
+ required:
+ - projectId
+ - destinationName
+ - serviceAccountKey
+ type: object
+ properties:
+ projectId:
+ title: Project Id
+ description: The Google Cloud PubSub Project Id
+ type: string
+ destinationName:
+ title: Destination Name
+ description: The Destination Name
+ type: string
+ serviceAccountKey:
+ title: Service Account Key
+ description: The Service account key that can be used as credentials for the PubSub publisher/subscriber
+ type: binary
+ dependencies:
+ - "camel:kamelet"
+ - "camel:google-pubsub"
+ - "camel:jackson"
+ flow:
+ from:
+ uri: kamelet:source
+ steps:
+ - to:
+ uri: "google-pubsub://{{projectId}}:{{destinationName}}"
+ parameters:
+ serviceAccountKey: "base64:{{serviceAccountKey}}"
[camel-kamelets] 01/05: Added Google Pubsub 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 google-pubsub-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit c80725d79e313ded741741287301ab9f3b2984d8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 8 15:29:45 2021 +0200
Added Google Pubsub Sink Kamelet
---
google-pubsub-sink.kamelet.yaml | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/google-pubsub-sink.kamelet.yaml b/google-pubsub-sink.kamelet.yaml
new file mode 100644
index 0000000..398b35f
--- /dev/null
+++ b/google-pubsub-sink.kamelet.yaml
@@ -0,0 +1,49 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: google-pubsub-sink
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9Ii0xLjYzMzIzNTQzIDcuMDMyNjA5MzMgMTMxLjI2NTc0NjgyIDExNC40MzkzOTA2NyIgd2lkdGg9IjI1MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI2NCIgeDI9IjY0IiB5MT0iNy4wMzQiIHkyPSIxMjAuNzg5Ij48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM0Mzg3ZmQiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3 [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Google Pubsub"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "Google Pubsub Sink"
+ description: |-
+ Send messages to Google Pubsub.
+
+ The serviceAccountKey property needs to be encoded in base64, so when you pass it as parameter, don't forget to encode it.
+ required:
+ - projectId
+ - destinationName
+ - serviceAccountKey
+ type: object
+ properties:
+ projectId:
+ title: Project Id
+ description: The Google Cloud PubSub Project Id
+ type: string
+ destinationName:
+ title: Destination Name
+ description: The Destination Name
+ type: string
+ serviceAccountKey:
+ title: Service Account Key
+ description: The Service account key that can be used as credentials for the PubSub publisher/subscriber
+ type: binary
+ dependencies:
+ - "camel:kamelet"
+ - "camel:google-pubsub"
+ - "camel:jackson"
+ flow:
+ from:
+ uri: kamelet:source
+ steps:
+ - to:
+ uri: "google-pubsub://{{projectId}}:{{destinationName}}"
+ parameters:
+ serviceAccountKey: "base64:{{serviceAccountKey}}"