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/08/04 12:10:29 UTC
[camel-k-examples] branch main updated (eecffe8 -> 23d05e0)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git.
from eecffe8 Kafka to AWS S3 Streaming Upload Example
new 98c1da8 Added AWS S3 to Log with secret example
new 23d05e0 Added Example to list
The 2 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/README.md | 1 +
.../{aws-s3-to-log => aws-s3-to-log-with-secret}/README.md | 14 ++++++++------
.../flow-binding.yaml | 12 +++++++-----
.../log-sink.kamelet.yaml | 0
4 files changed, 16 insertions(+), 11 deletions(-)
copy kamelets/{aws-s3-to-log => aws-s3-to-log-with-secret}/README.md (57%)
copy kamelets/{aws-s3-to-log => aws-s3-to-log-with-secret}/flow-binding.yaml (62%)
copy kamelets/{postgresql-to-log => aws-s3-to-log-with-secret}/log-sink.kamelet.yaml (100%)
[camel-k-examples] 02/02: Added Example to list
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git
commit 23d05e0089fc6d7d30708b27fab4f9a8e20ec310
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Aug 4 14:09:28 2021 +0200
Added Example to list
---
kamelets/README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/kamelets/README.md b/kamelets/README.md
index dfa7102..9d46b4f 100644
--- a/kamelets/README.md
+++ b/kamelets/README.md
@@ -13,6 +13,7 @@ All the Kamelet examples in this folder have been tested on Camel-K 1.5.0.
## Examples List
- [AWS S3 to Log](./aws-s3-to-log): Create a Kamelet binding between an AWS S3 Source Kamelet and a Log Sink Kamelet
+- [AWS S3 to Log with Secret](./aws-s3-to-log-with-secret): Create a Kamelet binding between an AWS S3 Source Kamelet and a Log Sink Kamelet and define S3 credentials through Kubernetes secret
- [AWS S3 to Kafka with Timestamp router](./aws-s3-to-kafka-with-timestamp-router): Create a Kamelet binding between an AWS S3 Source Kamelet and a Kafka Sink Kamelet, with the usage of the Timestamp Router Action.
- [Kafka to Kafka with Regex router](./kafka-to-kafka-with-regex-router): Create a Kamelet binding between a Kafka Source Kamelet and a Kafka Sink Kamelet, with the usage of the Regex Router Action.
- [Kafka to Kafka with Manual commit](./kafka-to-kafka-with-manual-commit): Create a Kamelet binding between a Kafka Source Kamelet and a Kafka Sink Kamelet, with the usage of the Manual Commit Action.
[camel-k-examples] 01/02: Added AWS S3 to Log with secret example
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git
commit 98c1da87e312fa592b274142a13630d24eb9241a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Aug 4 14:08:13 2021 +0200
Added AWS S3 to Log with secret example
---
kamelets/aws-s3-to-log-with-secret/README.md | 20 ++++++++++++++++++++
.../aws-s3-to-log-with-secret/flow-binding.yaml | 22 ++++++++++++++++++++++
.../log-sink.kamelet.yaml | 22 ++++++++++++++++++++++
3 files changed, 64 insertions(+)
diff --git a/kamelets/aws-s3-to-log-with-secret/README.md b/kamelets/aws-s3-to-log-with-secret/README.md
new file mode 100644
index 0000000..5546117
--- /dev/null
+++ b/kamelets/aws-s3-to-log-with-secret/README.md
@@ -0,0 +1,20 @@
+# S3 to Log with secrets
+
+- The Log Sink Kamelet is not available out of the box in 1.5.0 Camel-K release so you'll have to install it before installing the flow binding.
+
+- If camel-k has been installed in a specific namespace different from the default one, you'll need to add a parameter to all the command (-n <namespace_name>)
+
+- Run the following command to create the secret related to AWS S3 credentials
+
+ kubectl create secret generic aws-s3-secret --from-literal=accessKey=<accessKey> --from-literal=secretKey=<secretKey>
+
+- Run the following commands
+
+ kubectl apply -f log-sink.kamelet.yaml
+ kubectl apply -f flow-binding.yaml
+
+- Check logs
+
+ kamel logs s3-to-log-with-secret
+
+- If you have files on your S3 bucket you should see their content consumed and the file in the bucket deleted
diff --git a/kamelets/aws-s3-to-log-with-secret/flow-binding.yaml b/kamelets/aws-s3-to-log-with-secret/flow-binding.yaml
new file mode 100644
index 0000000..cd0f37b
--- /dev/null
+++ b/kamelets/aws-s3-to-log-with-secret/flow-binding.yaml
@@ -0,0 +1,22 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+ name: s3-to-log-with-secret
+spec:
+ integration:
+ configuration:
+ - type: "secret"
+ value: "aws-s3-secret"
+ source:
+ ref:
+ kind: Kamelet
+ apiVersion: camel.apache.org/v1alpha1
+ name: aws-s3-source
+ properties:
+ bucketNameOrArn: 'kamelets-demo'
+ region: 'eu-west-1'
+ sink:
+ ref:
+ kind: Kamelet
+ apiVersion: camel.apache.org/v1alpha1
+ name: log-sink
diff --git a/kamelets/aws-s3-to-log-with-secret/log-sink.kamelet.yaml b/kamelets/aws-s3-to-log-with-secret/log-sink.kamelet.yaml
new file mode 100755
index 0000000..a48fb41
--- /dev/null
+++ b/kamelets/aws-s3-to-log-with-secret/log-sink.kamelet.yaml
@@ -0,0 +1,22 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: log-sink
+ annotations:
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNDAgMjQwIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIuNjY3IiB4Mj0iLjQxNyIgeTE9Ii4xNjciIHkyPSIuNzUiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzM3YWVlMiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzFlOTZjOCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iLjY2IiB4Mj0iLjg1MSIgeTE9Ii40MzciIHkyPSIuODAyIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNlZmY3Zm [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+ camel.apache.org/kamelet.group: "Log"
+spec:
+ definition:
+ title: "Log Sink"
+ description: |-
+ Log something
+ type: object
+ flow:
+ from:
+ uri: "kamelet:source"
+ steps:
+ - to:
+ uri: "log:info?showAll=true"