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/13 07:22:50 UTC
[camel-k] branch main updated (abc6a0b98 -> 5d0dbd62b)
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.git
from abc6a0b98 chore: nightly resource refresh
new 19c126aba feature(#3903): Support secret refresh through the existing addons - Google Secret Manager
new 99264c30c feature(#3903): Support secret refresh through the existing addons - Google Secret Manager - Docs
new 5d0dbd62b feature(#3903): Support secret refresh through the existing addons - Google Secret Manager - Validate
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:
addons/vault/gcp/gcp_secret_manager.go | 25 +++++++++++++++++++++++
docs/modules/traits/pages/gcp-secret-manager.adoc | 20 ++++++++++++++++++
resources/traits.yaml | 18 ++++++++++++++++
3 files changed, 63 insertions(+)
[camel-k] 03/03: feature(#3903): Support secret refresh through the existing addons - Google Secret Manager - Validate
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.git
commit 5d0dbd62b2b97bf7c834aa0864250743e31bc6a6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 13 08:02:36 2023 +0100
feature(#3903): Support secret refresh through the existing addons - Google Secret Manager - Validate
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
addons/vault/gcp/gcp_secret_manager.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/vault/gcp/gcp_secret_manager.go b/addons/vault/gcp/gcp_secret_manager.go
index 910565dac..fb2549bb0 100644
--- a/addons/vault/gcp/gcp_secret_manager.go
+++ b/addons/vault/gcp/gcp_secret_manager.go
@@ -87,7 +87,7 @@ func (t *gcpSecretManagerTrait) Configure(environment *trait.Environment) (bool,
if t.ContextReloadEnabled == nil {
t.ContextReloadEnabled = pointer.Bool(false)
}
-
+
if t.RefreshEnabled == nil {
t.RefreshEnabled = pointer.Bool(false)
}
[camel-k] 02/03: feature(#3903): Support secret refresh through the existing addons - Google Secret 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 main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 99264c30c26cc28a189f3d5ab1023a31f80313a3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 13 07:56:53 2023 +0100
feature(#3903): Support secret refresh through the existing addons - Google Secret Manager - Docs
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
docs/modules/traits/pages/gcp-secret-manager.adoc | 20 ++++++++++++++++++++
resources/traits.yaml | 18 ++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/docs/modules/traits/pages/gcp-secret-manager.adoc b/docs/modules/traits/pages/gcp-secret-manager.adoc
index bcf73ea8d..e1be82e64 100644
--- a/docs/modules/traits/pages/gcp-secret-manager.adoc
+++ b/docs/modules/traits/pages/gcp-secret-manager.adoc
@@ -49,6 +49,26 @@ The following configuration options are available:
| bool
| Define if we want to use the Default Instance approach for accessing the Google Secret Manager service
+| gcp-secret-manager.context-reload-enabled,omitempty
+| bool
+| Define if we want to use the Camel Context Reload feature or not
+
+| gcp-secret-manager.refresh-enabled,omitempty
+| bool
+| Define if we want to use the Refresh Feature for secrets
+
+| gcp-secret-manager.refresh-period,omitempty
+| string
+| If Refresh is enabled, this defines the interval to check the refresh event
+
+| gcp-secret-manager.refresh-period,omitempty
+| string
+| If Refresh is enabled, the regular expression representing the secrets we want to track
+
+| gcp-secret-manager.refresh-period,omitempty
+| string
+| If Refresh is enabled, this defines the subscription name to the Google PubSub topic used to keep track of updates
+
|===
// End of autogenerated code - DO NOT EDIT! (configuration)
diff --git a/resources/traits.yaml b/resources/traits.yaml
index 762d26e96..8ce2539f3 100755
--- a/resources/traits.yaml
+++ b/resources/traits.yaml
@@ -465,6 +465,24 @@ traits:
type: bool
description: Define if we want to use the Default Instance approach for accessing
the Google Secret Manager service
+ - 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: refresh-period,omitempty
+ type: string
+ description: If Refresh is enabled, this defines the subscription name to the
+ Google PubSub topic used to keep track of updates
- name: hashicorp-vault
platform: false
profiles:
[camel-k] 01/03: feature(#3903): Support secret refresh through the existing addons - Google Secret Manager
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.git
commit 19c126abab655307efe8998f9c96cfdeb1bcdefe
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 13 07:54:10 2023 +0100
feature(#3903): Support secret refresh through the existing addons - Google Secret Manager
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
addons/vault/gcp/gcp_secret_manager.go | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/addons/vault/gcp/gcp_secret_manager.go b/addons/vault/gcp/gcp_secret_manager.go
index 0b832d682..910565dac 100644
--- a/addons/vault/gcp/gcp_secret_manager.go
+++ b/addons/vault/gcp/gcp_secret_manager.go
@@ -48,6 +48,16 @@ type Trait struct {
ServiceAccountKey string `property:"service-account-key,omitempty"`
// Define if we want to use the Default Instance approach for accessing the Google Secret Manager service
UseDefaultInstance *bool `property:"use-default-instance,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"`
+ // If Refresh is enabled, this defines the subscription name to the Google PubSub topic used to keep track of updates
+ SubscriptionName string `property:"refresh-period,omitempty"`
}
type gcpSecretManagerTrait struct {
@@ -74,6 +84,14 @@ func (t *gcpSecretManagerTrait) Configure(environment *trait.Environment) (bool,
t.UseDefaultInstance = pointer.Bool(false)
}
+ if t.ContextReloadEnabled == nil {
+ t.ContextReloadEnabled = pointer.Bool(false)
+ }
+
+ if t.RefreshEnabled == nil {
+ t.RefreshEnabled = pointer.Bool(false)
+ }
+
return true, nil
}
@@ -88,6 +106,13 @@ func (t *gcpSecretManagerTrait) Apply(environment *trait.Environment) error {
environment.ApplicationProperties["camel.vault.gcp.projectId"] = t.ProjectID
environment.ApplicationProperties["camel.vault.gcp.serviceAccountKey"] = t.ServiceAccountKey
environment.ApplicationProperties["camel.vault.gcp.useDefaultInstance"] = strconv.FormatBool(*t.UseDefaultInstance)
+ environment.ApplicationProperties["camel.vault.gcp.refreshEnabled"] = strconv.FormatBool(*t.RefreshEnabled)
+ environment.ApplicationProperties["camel.main.context-reload-enabled"] = strconv.FormatBool(*t.ContextReloadEnabled)
+ environment.ApplicationProperties["camel.vault.gcp.refreshPeriod"] = t.RefreshPeriod
+ environment.ApplicationProperties["camel.vault.gcp.subscriptionName"] = t.SubscriptionName
+ if t.Secrets != "" {
+ environment.ApplicationProperties["camel.vault.gcp.secrets"] = t.Secrets
+ }
}
return nil