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 2022/04/21 16:46:29 UTC
[camel-k-examples] 01/02: First example of usage of AWS Secret Manager as vault for camel-k
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 c09ea9936f784d9721d0173f22d241e29a8c70ee
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Apr 21 18:33:53 2022 +0200
First example of usage of AWS Secret Manager as vault for camel-k
---
.../aws-secret-manager.properties | 3 ++
.../timer-finnhub-aws-secret-manager.yaml | 33 ++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/12-aws-secret-manager-vault/aws-secret-manager.properties b/12-aws-secret-manager-vault/aws-secret-manager.properties
new file mode 100644
index 0000000..c0e160e
--- /dev/null
+++ b/12-aws-secret-manager-vault/aws-secret-manager.properties
@@ -0,0 +1,3 @@
+camel.vault.aws.accessKey = <access_key>
+camel.vault.aws.secretKey = <secret_key>
+camel.vault.aws.region = <region>
diff --git a/12-aws-secret-manager-vault/timer-finnhub-aws-secret-manager.yaml b/12-aws-secret-manager-vault/timer-finnhub-aws-secret-manager.yaml
new file mode 100644
index 0000000..ef32327
--- /dev/null
+++ b/12-aws-secret-manager-vault/timer-finnhub-aws-secret-manager.yaml
@@ -0,0 +1,33 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# camel-k: dependency=camel:aws-secrets-manager
+
+- route:
+ from:
+ uri: "kamelet:timer-source"
+ parameters:
+ period: 10000
+ message: 'test'
+ steps:
+ - to:
+ uri: "https://finnhub.io/api/v1/quote?symbol=AAPL&token={{aws:finnhub-token}}"
+ - to:
+ uri: "kamelet:log-sink"
+ parameters:
+ showStreams: true
+ showHeaders: true