This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch google-pubsub-source
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 2dbc798e363445c56d46ef291ac4d684f505793d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 8 14:01:16 2021 +0200
Added Google pubsub Source Kamelet
---
docs/modules/ROOT/pages/google-pubsub-source.adoc | 8 +++++---
templates/bindings/camel-k/google-pubsub-source-binding.yaml | 1 +
templates/bindings/core/google-pubsub-source-binding.yaml | 1 +
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/docs/modules/ROOT/pages/google-pubsub-source.adoc b/docs/modules/ROOT/pages/google-pubsub-source.adoc
index 5c31312..e6d25e1 100644
--- a/docs/modules/ROOT/pages/google-pubsub-source.adoc
+++ b/docs/modules/ROOT/pages/google-pubsub-source.adoc
@@ -17,8 +17,8 @@ The following table summarizes the configuration options available for the `goog
| Property| Name| Description| Type| Default| Example
| *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| |
+| *subscriptionName {empty}* *| Subscription Name| The Subscription Name| string| |
| maxMessagesPerPoll| Max Messages Per Poll| The max number of messages to receive from the server in a single API call| integer| `1`|
-| subscriptionName| Subscription Name| The Subscription Name| string| |
| synchronousPull| Synchronous Pull| If Synchronously pull batches of messages is enabled or not| boolean| `false`|
|===
@@ -48,6 +48,7 @@ spec:
properties:
projectId: "The Project Id"
serviceAccountKey: "The Service Account Key"
+ subscriptionName: "The Subscription Name"
sink:
ref:
kind: InMemoryChannel
@@ -72,7 +73,7 @@ The procedure described above can be simplified into a single execution of the `
[source,shell]
----
-kamel bind google-pubsub-source -p "source.projectId=The Project Id" -p "source.serviceAccountKey=The Service Account Key" channel/mychannel
+kamel bind google-pubsub-source -p "source.projectId=The Project Id" -p "source.serviceAccountKey=The Service Account Key" -p "source.subscriptionName=The Subscription Name" channel/mychannel
----
This will create the KameletBinding under the hood and apply it to the current namespace in the cluster.
@@ -97,6 +98,7 @@ spec:
properties:
projectId: "The Project Id"
serviceAccountKey: "The Service Account Key"
+ subscriptionName: "The Subscription Name"
sink:
ref:
kind: KafkaTopic
@@ -123,7 +125,7 @@ The procedure described above can be simplified into a single execution of the `
[source,shell]
----
-kamel bind google-pubsub-source -p "source.projectId=The Project Id" -p "source.serviceAccountKey=The Service Account Key" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+kamel bind google-pubsub-source -p "source.projectId=The Project Id" -p "source.serviceAccountKey=The Service Account Key" -p "source.subscriptionName=The Subscription Name" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
----
This will create the KameletBinding under the hood and apply it to the current namespace in the cluster.
diff --git a/templates/bindings/camel-k/google-pubsub-source-binding.yaml b/templates/bindings/camel-k/google-pubsub-source-binding.yaml
index 367f326..d5423f1 100644
--- a/templates/bindings/camel-k/google-pubsub-source-binding.yaml
+++ b/templates/bindings/camel-k/google-pubsub-source-binding.yaml
@@ -11,6 +11,7 @@ spec:
properties:
projectId: "The Project Id"
serviceAccountKey: "The Service Account Key"
+ subscriptionName: "The Subscription Name"
sink:
ref:
kind: KafkaTopic
diff --git a/templates/bindings/core/google-pubsub-source-binding.yaml b/templates/bindings/core/google-pubsub-source-binding.yaml
index a696002..c8ff5bb 100644
--- a/templates/bindings/core/google-pubsub-source-binding.yaml
+++ b/templates/bindings/core/google-pubsub-source-binding.yaml
@@ -4,6 +4,7 @@
parameters:
projectId: "The Project Id"
serviceAccountKey: "The Service Account Key"
+ subscriptionName: "The Subscription Name"
steps:
- to:
uri: "log:info"