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 12:35:21 UTC

[camel-kamelets] 02/08: Added Google Storage Source Kamelet

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

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

commit e9b9299675e4071112f3825f2125135c6b36dbda
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 16 13:28:47 2021 +0100

    Added Google Storage Source Kamelet
---
 .../kamelets/google-storage-source.kamelet.yaml    | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/google-storage-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/google-storage-source.kamelet.yaml
new file mode 100644
index 0000000..cade8a9
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/google-storage-source.kamelet.yaml
@@ -0,0 +1,77 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: google-storage-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,PHN2ZyBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9Ii0xLjYzMzIzNTQzIDcuMDMyNjA5MzMgMTMxLjI2NTc0NjgyIDExNC40MzkzOTA2NyIgd2lkdGg9IjI1MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI2NCIgeDI9IjY0IiB5MT0iNy4wMzQiIHkyPSIxMjAuNzg5Ij48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM0Mzg3ZmQiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Google Storage"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Google Storage Source"
+    description: |-
+      Consume Objects from Google Storage.
+
+      The serviceAccountKey property needs to be encoded in base64, so when you pass it as parameter, don't forget to encode it.
+    required:
+      - bucketNameOrArn
+      - serviceAccountKey
+    type: object
+    properties:
+      bucketNameOrArn:
+        title: Bucket Name Or ARN
+        description: The Bucket Name or Bucket ARN
+        type: string
+      serviceAccountKey:
+        title: Service Account Key
+        description: The Service account key that can be used as credentials for the Google Cloud Storage access.
+        type: binary
+        x-descriptors:
+        - urn:camel:group:credentials
+      deleteAfterRead:
+        title: Auto-delete Objects
+        description: Delete objects after consuming them
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: true
+      autoCreateBucket:
+        title: Autocreate Bucket
+        description: Setting the autocreation of the Google Cloud Storage bucket bucketNameOrArn. 
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: false
+  dependencies:
+    - "camel:kamelet"
+    - "camel:google-storage"
+    - "camel:jackson"
+  flow:
+    from:
+      uri: "google-storage://{{bucketNameOrArn}}"
+      parameters:
+        autoCreateBucket: "{{autoCreateBucket}}"
+        serviceAccountKey: "base64:{{serviceAccountKey}}"
+        deleteAfterRead: "{{deleteAfterRead}}"
+      steps:
+      - to: kamelet:sink