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:57:17 UTC

[camel-kamelets] branch master updated (66ba2ca -> 2d92967)

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

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


    from 66ba2ca  Minio Source: Missing endpoint and autoCreateBucket option
     new 7b68458  Added Minio Sink Kamelet
     new 1993c5e  Added Minio Sink Kamelet
     new 2d92967  Added Minio Sink Kamelet

The 3 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.


Summary of changes:
 .../kamelets/{minio-source.svg => minio-sink.svg}  |  0
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../pages/{minio-source.adoc => minio-sink.adoc}   | 41 ++++++++-------
 ...-source.kamelet.yaml => minio-sink.kamelet.yaml | 61 +++++++++++++---------
 4 files changed, 59 insertions(+), 44 deletions(-)
 copy docs/modules/ROOT/assets/images/kamelets/{minio-source.svg => minio-sink.svg} (100%)
 copy docs/modules/ROOT/pages/{minio-source.adoc => minio-sink.adoc} (68%)
 copy minio-source.kamelet.yaml => minio-sink.kamelet.yaml (70%)

[camel-kamelets] 02/03: Added Minio 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 master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 1993c5e8620b88bf5dfd02f6e32caf73f2f34df8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 30 14:41:47 2021 +0200

    Added Minio 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 d370b95..fcee3cc 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -23,6 +23,7 @@
 * xref:ROOT:jira-source.adoc[image:kamelets/jira-source.svg[] Jira Source]
 * xref:ROOT:kafka-source.adoc[image:kamelets/kafka-source.svg[] Kafka Source]
 * xref:ROOT:mail-imap-source.adoc[image:kamelets/mail-imap-source.svg[] Mail IMAP Source]
+* xref:ROOT:minio-sink.adoc[image:kamelets/minio-sink.svg[] Minio Sink]
 * xref:ROOT:minio-source.adoc[image:kamelets/minio-source.svg[] Minio Source]
 * xref:ROOT:mqtt-source.adoc[image:kamelets/mqtt-source.svg[] MQTT Source]
 * xref:ROOT:nats-source.adoc[image:kamelets/nats-source.svg[] NATS Source]

[camel-kamelets] 03/03: Added Minio 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 master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 2d92967a56e3225b29c3afbb028d71758c9db6b4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 30 14:43:06 2021 +0200

    Added Minio Sink Kamelet
---
 .../ROOT/assets/images/kamelets/minio-sink.svg     |  1 +
 docs/modules/ROOT/pages/minio-sink.adoc            | 73 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/minio-sink.svg b/docs/modules/ROOT/assets/images/kamelets/minio-sink.svg
new file mode 100644
index 0000000..e928e78
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/minio-sink.svg
@@ -0,0 +1 @@
+<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 162.612 24.465"><path d="M52.751.414h9.108v23.63h-9.108zM41.711.74l-18.488 9.92a.919.919 0 0 1-.856 0L3.879.74A2.808 2.808 0 0 0 2.558.414h-.023A2.4 2.4 0 0 0 0 2.641v21.376h9.1V13.842a.918.918 0 0 1 1.385-.682l10.361 5.568a3.634 3.634 0 0 0 3.336.028l10.933-5.634a.917.917 0 0 1 1.371.69v10.205h9.1V2.641A2.4 2.4 0 0 0 43.055.414h-.023a2.808 2.808 0 0 0-1.321.326zm65.564-.326h-9.237v10.755a.913.913 0 0 1-1.338.706L72 [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/minio-sink.adoc b/docs/modules/ROOT/pages/minio-sink.adoc
new file mode 100644
index 0000000..1596986
--- /dev/null
+++ b/docs/modules/ROOT/pages/minio-sink.adoc
@@ -0,0 +1,73 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/minio-sink.svg[] Minio Sink
+
+*Provided by: "Apache Software Foundation"*
+
+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.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `minio-sink` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *accessKey {empty}* *| Access Key| The access key obtained from Minio| string| | 
+| *bucketName {empty}* *| Bucket Name| The Minio Bucket name| string| | 
+| *endpoint {empty}* *| Endpoint| The Minio Endpoint, it can be an URL, domain name, IPv4 address or IPv6 address.| string| | `"http://localhost:9000"`
+| *secretKey {empty}* *| Secret Key| The secret key obtained from Minio| string| | 
+| autoCreateBucket| Autocreate bucket| Setting the autocreation of the S3 bucket bucketName.| boolean| `false`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `minio-sink` can be used in various contexts.
+
+=== Knative Sink
+
+The `minio-sink` Kamelet can be used as Knative sink by binding it to a Knative object.
+
+.minio-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: minio-sink-binding
+spec:
+  source:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: minio-sink
+    properties:
+      accessKey: "The Access Key"
+      bucketName: "The Bucket Name"
+      endpoint: "http://localhost:9000"
+      secretKey: "The Secret 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 `minio-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 minio-sink-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

[camel-kamelets] 01/03: Added Minio 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 master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 7b68458a28f7fee83e44d52b18e9688e0df68125
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}}"