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/03/30 12:43:25 UTC

[camel-kamelets] 01/03: Added Minio Sink Kamelet

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

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

commit 357e5e6920d0896b54a807e164a007a8cc1c6aab
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 30 14:41:15 2021 +0200

    Added Minio Sink Kamelet
---
 minio-sink.kamelet.yaml | 82 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/minio-sink.kamelet.yaml b/minio-sink.kamelet.yaml
new file mode 100644
index 0000000..78e894c
--- /dev/null
+++ b/minio-sink.kamelet.yaml
@@ -0,0 +1,82 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: minio-sink
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBkYXRhLW5hbWU9IkxheWVyIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE2Mi42MTIgMjQuNDY1Ij48cGF0aCBkPSJNNTIuNzUxLjQxNGg5LjEwOHYyMy42M2gtOS4xMDh6TTQxLjcxMS43NGwtMTguNDg4IDkuOTJhLjkxOS45MTkgMCAwIDEtLjg1NiAwTDMuODc5Ljc0QTIuODA4IDIuODA4IDAgMCAwIDIuNTU4LjQxNGgtLjAyM0EyLjQgMi40IDAgMCAwIDAgMi42NDF2MjEuMzc2aDkuMVYxMy44NDJhLjkxOC45MTggMCAwIDEgMS4zODUtLjY4MmwxMC4zNjEgNS41NjhhMy42MzQgMy42MzQgMCAwIDAgMy4zMzYuMD [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "Minio Sink"
+    description: |-
+      Upload data to Minio.
+
+      The Kamelet expects the following headers to be set:
+
+      - `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.
+    required:
+      - bucketName
+      - accessKey
+      - secretKey
+      - endpoint
+    properties:
+      bucketName:
+        title: Bucket Name
+        description: The Minio Bucket name
+        type: string
+      accessKey:
+        title: Access Key
+        description: The access key obtained from Minio
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      secretKey:
+        title: Secret Key
+        description: The secret key obtained from Minio
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      endpoint:
+        title: Endpoint
+        description: The Minio Endpoint, it can be an URL, domain name, IPv4 address or IPv6 address.
+        type: string
+        example: http://localhost:9000
+      autoCreateBucket:
+        title: Autocreate bucket
+        description: Setting the autocreation of the S3 bucket bucketName. 
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: false
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          when:
+          - simple: "${header[file]}"
+            steps:
+            - set-header:
+                name: CamelMinioObjectName
+                simple: "${header[file]}"
+          - simple: "${header[ce-file]}"
+            steps:
+            - set-header:
+                name: CamelMinioObjectName
+                simple: "${header[ce-file]}"
+          otherwise:
+            steps:
+            - set-property:
+                name: CamelMinioObjectName
+                simple: "${exchangeId}"
+      - to:
+          uri: "minio:{{bucketName}}"
+          parameters:
+            autoCreateBucket: "{{autoCreateBucket}}"
+            secretKey: "{{secretKey}}"
+            accessKey: "{{accessKey}}"
+            endpoint: "{{endpoint}}"