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 2023/02/10 10:54:43 UTC

[camel-k] branch 3903-aws created (now e437ec5d4)

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

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


      at e437ec5d4 feature(#3903): Support secret refresh through the existing addons - AWS Secrets Manager - Docs

This branch includes the following new commits:

     new d187b8d48 feature(#3903): Support secret refresh through the existing addons - AWS Secrets Manager
     new e437ec5d4 feature(#3903): Support secret refresh through the existing addons - AWS Secrets Manager - Docs

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.



[camel-k] 01/02: feature(#3903): Support secret refresh through the existing addons - AWS Secrets Manager

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch 3903-aws
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit d187b8d48b38380faf03a47e35e238e051a960f1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 10 11:51:44 2023 +0100

    feature(#3903): Support secret refresh through the existing addons - AWS Secrets Manager
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 addons/vault/aws/aws_secrets_manager.go | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/addons/vault/aws/aws_secrets_manager.go b/addons/vault/aws/aws_secrets_manager.go
index 33bbc8c26..e9f12ec08 100644
--- a/addons/vault/aws/aws_secrets_manager.go
+++ b/addons/vault/aws/aws_secrets_manager.go
@@ -50,6 +50,14 @@ type Trait struct {
 	Region string `property:"region,omitempty"`
 	// Define if we want to use the Default Credentials Provider chain as authentication method
 	UseDefaultCredentialsProvider *bool `property:"use-default-credentials-provider,omitempty"`
+	// Define if we want to use the Camel Context Reload feature or not
+	ContextReloadEnabled *bool `property:"context-reload-enabled,omitempty"`
+	// Define if we want to use the Refresh Feature for secrets
+	RefreshEnabled *bool `property:"refresh-enabled,omitempty"`
+	// If Refresh is enabled, this defines the interval to check the refresh event
+	RefreshPeriod string `property:"refresh-period,omitempty"`
+	// If Refresh is enabled, the regular expression representing the secrets we want to track
+	Secrets string `property:"refresh-period,omitempty"`
 }
 
 type awsSecretsManagerTrait struct {
@@ -75,6 +83,12 @@ func (t *awsSecretsManagerTrait) Configure(environment *trait.Environment) (bool
 	if t.UseDefaultCredentialsProvider == nil {
 		t.UseDefaultCredentialsProvider = pointer.Bool(false)
 	}
+	if t.ContextReloadEnabled == nil {
+		t.ContextReloadEnabled = pointer.Bool(false)
+	}
+	if t.RefreshEnabled == nil {
+		t.RefreshEnabled = pointer.Bool(false)
+	}
 
 	return true, nil
 }
@@ -91,6 +105,12 @@ func (t *awsSecretsManagerTrait) Apply(environment *trait.Environment) error {
 		environment.ApplicationProperties["camel.vault.aws.secretKey"] = t.SecretKey
 		environment.ApplicationProperties["camel.vault.aws.region"] = t.Region
 		environment.ApplicationProperties["camel.vault.aws.defaultCredentialsProvider"] = strconv.FormatBool(*t.UseDefaultCredentialsProvider)
+		environment.ApplicationProperties["camel.vault.aws.refreshEnabled"] = strconv.FormatBool(*t.RefreshEnabled)
+		environment.ApplicationProperties["camel.main.context-reload-enabled"] = strconv.FormatBool(*t.ContextReloadEnabled)
+		environment.ApplicationProperties["camel.vault.aws.refreshPeriod"] = t.RefreshPeriod
+		if t.Secrets != "" {
+			environment.ApplicationProperties["camel.vault.aws.secrets"] = t.Secrets
+		}
 	}
 
 	return nil


[camel-k] 02/02: feature(#3903): Support secret refresh through the existing addons - AWS Secrets Manager - Docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch 3903-aws
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit e437ec5d4cad5e03cb9c02418050e98128ee0ec7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 10 11:54:18 2023 +0100

    feature(#3903): Support secret refresh through the existing addons - AWS Secrets Manager - Docs
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 docs/modules/traits/pages/aws-secrets-manager.adoc | 16 ++++++++++++++++
 resources/traits.yaml                              | 14 ++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/docs/modules/traits/pages/aws-secrets-manager.adoc b/docs/modules/traits/pages/aws-secrets-manager.adoc
index b0b894d65..f889dd86b 100644
--- a/docs/modules/traits/pages/aws-secrets-manager.adoc
+++ b/docs/modules/traits/pages/aws-secrets-manager.adoc
@@ -53,6 +53,22 @@ The following configuration options are available:
 | bool
 | Define if we want to use the Default Credentials Provider chain as authentication method
 
+| aws-secrets-manager.context-reload-enabled,omitempty
+| bool
+| Define if we want to use the Camel Context Reload feature or not
+
+| aws-secrets-manager.refresh-enabled,omitempty
+| bool
+| Define if we want to use the Refresh Feature for secrets
+
+| aws-secrets-manager.refresh-period,omitempty
+| string
+| If Refresh is enabled, this defines the interval to check the refresh event
+
+| aws-secrets-manager.refresh-period,omitempty
+| string
+| If Refresh is enabled, the regular expression representing the secrets we want to track
+
 |===
 
 // End of autogenerated code - DO NOT EDIT! (configuration)
diff --git a/resources/traits.yaml b/resources/traits.yaml
index eb8d4f876..762d26e96 100755
--- a/resources/traits.yaml
+++ b/resources/traits.yaml
@@ -99,6 +99,20 @@ traits:
     type: bool
     description: Define if we want to use the Default Credentials Provider chain as
       authentication method
+  - name: context-reload-enabled,omitempty
+    type: bool
+    description: Define if we want to use the Camel Context Reload feature or not
+  - name: refresh-enabled,omitempty
+    type: bool
+    description: Define if we want to use the Refresh Feature for secrets
+  - name: refresh-period,omitempty
+    type: string
+    description: If Refresh is enabled, this defines the interval to check the refresh
+      event
+  - name: refresh-period,omitempty
+    type: string
+    description: If Refresh is enabled, the regular expression representing the secrets
+      we want to track
 - name: azure-key-vault
   platform: false
   profiles: