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/07/27 12:43:37 UTC

[camel-kamelets] 01/08: Added Azure CosmosDB Source Kamelet

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

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

commit 452d4167fd41e4706d3bb65cd688fcb31c2554c6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jul 27 14:37:28 2021 +0200

    Added Azure CosmosDB Source Kamelet
---
 azure-cosmosdb-source.kamelet.yaml | 82 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/azure-cosmosdb-source.kamelet.yaml b/azure-cosmosdb-source.kamelet.yaml
new file mode 100644
index 0000000..812ecf3
--- /dev/null
+++ b/azure-cosmosdb-source.kamelet.yaml
@@ -0,0 +1,82 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: azure-cosmosdb-source
+  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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxOCI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJhIiBjeD0iLTEwNS4wMDYiIGN5PSItMTAuNDA5IiByPSI1Ljk1NCIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjAzNiAwIDAgMS4wMjcgMTE3LjczOSAxOS42NDQpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIuMTgzIiBzdG9wLWNvbG9yPSIjNWVhMGVmIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA3OGQ0Ii8+PC9yYWRpYWxHcmFkaWVudD48Y2xpcFBhdG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Azure CosmosDB"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Azure CosmosDB Source"
+    description: |-
+      Consume Changes from a CosmosDB instance
+    required:
+      - databaseName
+      - containerName
+      - accountKey
+      - databaseEndpoint
+    type: object
+    properties:
+      databaseName:
+        title: Database Name
+        description: The Azure Cosmos database name.
+        type: string
+      containerName:
+        title: Container Name
+        description: The Azure Cosmos container name.
+        type: string
+      accountKey:
+        title: Account Key
+        description: The Azure Cosmos account Key.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      leaseDatabaseName:
+        title: Lease Database Name
+        description: Sets the lease container which acts as a state storage and coordinates processing the change feed across multiple workers.
+        type: string
+      leaseContainerName:
+        title: Lease Container Name
+        description: Sets the lease database where the leaseContainerName will be stored.
+        type: string
+      createLeaseDatabaseIfNotExists:
+        title: Autocreate Lease Database
+        description: Sets if the component should create Cosmos lease database for the consumer automatically in case it doesn’t exist in Cosmos account. 
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: false
+      createLeaseContainerIfNotExists:
+        title: Autocreate Lease Container
+        description: Sets if the component should create Cosmos lease container for the consumer automatically in case it doesn’t exist in Cosmos database. 
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: false
+      databaseEndpoint:
+        title: Database Endpoint
+        description: Sets the Azure Cosmos database endpoint the component will connect to.
+        type: string
+  dependencies:
+    - "camel:azure-cosmosdb"
+  flow:
+    from:
+      uri: "azure-cosmosdb:{{databaseName}}/{{containerName}}"
+      parameters:
+        leaseDatabaseName: "{{?leaseDatabaseName}}"
+        leaseContainerName: "{{?leaseContainerName}}"
+        accountKey: "{{accountKey}}"
+        createLeaseDatabaseIfNotExists: "{{createLeaseDatabaseIfNotExists}}"
+        createLeaseContainerIfNotExists: "{{createLeaseContainerIfNotExists}}"
+        databaseEndpoint: "{{databaseEndpoint}}"
+      steps:
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"
+