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 17:41:20 UTC
[camel-k] branch main updated (c1f47ce55 -> aa94a9487)
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 c1f47ce55 chore(ci): bump java crds
new 0a9250af3 feature(#3903): Support secret refresh through the existing addons - Azure Key Vault
new 8f27228b3 feature(#3903): Support secret refresh through the existing addons - Azure Key Vault
new 1e990613d feature(#3903): Support secret refresh through the existing addons - Azure Key Vault - Docs
new aa94a9487 feature(#3903): Support secret refresh through the existing addons - Azure Key Vault - Validate
The 4 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/azure/azure_key_vault.go | 36 ++++++++++++++++++++++++++
docs/modules/traits/pages/azure-key-vault.adoc | 32 +++++++++++++++++++++++
pkg/resources/resources.go | 4 +--
resources/traits.yaml | 30 +++++++++++++++++++++
4 files changed, 100 insertions(+), 2 deletions(-)
[camel-k] 01/04: feature(#3903): Support secret refresh through the existing addons - Azure Key Vault
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 0a9250af3cb55d399078b81051448b4ebe104838
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 13 18:13:04 2023 +0100
feature(#3903): Support secret refresh through the existing addons - Azure Key Vault
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
addons/vault/azure/azure_key_vault.go | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/addons/vault/azure/azure_key_vault.go b/addons/vault/azure/azure_key_vault.go
index 2bec04985..429858c0b 100644
--- a/addons/vault/azure/azure_key_vault.go
+++ b/addons/vault/azure/azure_key_vault.go
@@ -23,6 +23,7 @@ import (
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util"
"k8s.io/utils/pointer"
+ "strconv"
)
// The Azure Key Vault trait can be used to use secrets from Azure Key Vault service
@@ -48,6 +49,22 @@ type Trait struct {
ClientSecret string `property:"client-secret,omitempty"`
// The Azure Vault Name for accessing Key Vault
VaultName string `property:"vault-name,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, the connection String to point to the Eventhub service used to track updates
+ EventhubConnectionString string `property:"refresh-period,omitempty"`
+ // If Refresh is enabled, the account name for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
+ BlobAccountName string `property:"refresh-period,omitempty"`
+ // If Refresh is enabled, the access key for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
+ BlobAccessKey string `property:"refresh-period,omitempty"`
+ // If Refresh is enabled, the container name for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
+ BlobContainerName string `property:"refresh-period,omitempty"`
}
type azureKeyVaultTrait struct {
@@ -70,6 +87,14 @@ func (t *azureKeyVaultTrait) Configure(environment *trait.Environment) (bool, er
return false, nil
}
+ if t.ContextReloadEnabled == nil {
+ t.ContextReloadEnabled = pointer.Bool(false)
+ }
+
+ if t.RefreshEnabled == nil {
+ t.RefreshEnabled = pointer.Bool(false)
+ }
+
return true, nil
}
@@ -85,6 +110,16 @@ func (t *azureKeyVaultTrait) Apply(environment *trait.Environment) error {
environment.ApplicationProperties["camel.vault.azure.clientId"] = t.ClientID
environment.ApplicationProperties["camel.vault.azure.clientSecret"] = t.ClientSecret
environment.ApplicationProperties["camel.vault.azure.vaultName"] = t.VaultName
+ environment.ApplicationProperties["camel.vault.azure.refreshEnabled"] = strconv.FormatBool(*t.RefreshEnabled)
+ environment.ApplicationProperties["camel.main.context-reload-enabled"] = strconv.FormatBool(*t.ContextReloadEnabled)
+ environment.ApplicationProperties["camel.vault.azure.refreshPeriod"] = t.RefreshPeriod
+ if t.Secrets != "" {
+ environment.ApplicationProperties["camel.vault.azure.secrets"] = t.Secrets
+ }
+ environment.ApplicationProperties["camel.vault.azure.eventhubConnectionString"] = t.EventhubConnectionString
+ environment.ApplicationProperties["camel.vault.azure.blobAccountName"] = t.BlobAccountName
+ environment.ApplicationProperties["camel.vault.azure.blobContainerName"] = t.BlobContainerName
+ environment.ApplicationProperties["camel.vault.azure.blobAccessKey"] = t.BlobAccessKey
}
return nil
[camel-k] 02/04: feature(#3903): Support secret refresh through the existing addons - Azure Key Vault
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 8f27228b3518197872a6243088be546ed95c3c37
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 13 18:14:26 2023 +0100
feature(#3903): Support secret refresh through the existing addons - Azure Key Vault
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
pkg/resources/resources.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index 73621a216..7482de1c4 100644
--- a/pkg/resources/resources.go
+++ b/pkg/resources/resources.go
@@ -611,9 +611,9 @@ var assets = func() http.FileSystem {
"/traits.yaml": &vfsgen۰CompressedFileInfo{
name: "traits.yaml",
modTime: time.Time{},
- uncompressedSize: 60302,
+ uncompressedSize: 61071,
- compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xfd\x73\x1b\x39\x92\x20\xfa\xbb\xff\x0a\x84\xf6\x6d\x48\xf2\x23\x29\x77\xcf\xf6\x6c\xaf\xde\xf3\xce\xa9\xdd\xee\x19\x75\xfb\x43\x67\xa9\x7b\x76\xc2\xe7\x18\x82\x55\x20\x09\xb3\x08\xd4\x00\x28\xca\xec\xdb\xfb\xdf\x2f\x90\x99\xf8\xa8\x62\x51\x24\x6d\xa9\x6f\x74\xb3\x33\x11\x6d\x91\xac\x02\x12\x89\x44\x66\x22\x3f\x9d\xe1\xd2\xd9\xf3\x27\x43\xa6\xf8\x52\x9c\xb3\xdf\xd9\x82\x57\xe2\x09\x63\x75\xc5\xdd\x54\x9b\xe5\x [...]
+ compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x7d\x6b\x73\x1b\x39\x92\xe0\x77\xff\x0a\x84\xf6\x36\x24\xf9\x48\xca\x3d\xb3\x3d\xdb\xab\x3b\xef\x9c\xda\xed\x9e\x51\xb7\x1f\x3a\x4b\xdd\xb3\x13\x3e\xc7\x10\xac\x02\x49\x98\x45\xa0\x06\x40\x51\x66\xdf\xde\x7f\xbf\x40\x66\xe2\x51\xc5\xa2\x48\xda\x52\xdf\xe8\xe6\x11\xd1\x16\xc9\x2a\x20\x91\x48\x64\x26\xf2\xe9\x0c\x97\xce\x9e\x3f\x19\x32\xc5\x97\xe2\x9c\xfd\xd6\x16\xbc\x12\x4f\x18\xab\x2b\xee\xa6\xda\x2c\xcf\xd9\x94\x [...]
},
}
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
[camel-k] 03/04: feature(#3903): Support secret refresh through the existing addons - Azure Key Vault - 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 1e990613d44dd0d4026fded8a08fb4f52a1714cb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 13 18:16:32 2023 +0100
feature(#3903): Support secret refresh through the existing addons - Azure Key Vault - Docs
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
docs/modules/traits/pages/azure-key-vault.adoc | 32 ++++++++++++++++++++++++++
resources/traits.yaml | 30 ++++++++++++++++++++++++
2 files changed, 62 insertions(+)
diff --git a/docs/modules/traits/pages/azure-key-vault.adoc b/docs/modules/traits/pages/azure-key-vault.adoc
index cef504219..69c73efdc 100644
--- a/docs/modules/traits/pages/azure-key-vault.adoc
+++ b/docs/modules/traits/pages/azure-key-vault.adoc
@@ -53,6 +53,38 @@ The following configuration options are available:
| string
| The Azure Vault Name for accessing Key Vault
+| azure-key-vault.context-reload-enabled,omitempty
+| bool
+| Define if we want to use the Camel Context Reload feature or not
+
+| azure-key-vault.refresh-enabled,omitempty
+| bool
+| Define if we want to use the Refresh Feature for secrets
+
+| azure-key-vault.refresh-period,omitempty
+| string
+| If Refresh is enabled, this defines the interval to check the refresh event
+
+| azure-key-vault.refresh-period,omitempty
+| string
+| If Refresh is enabled, the regular expression representing the secrets we want to track
+
+| azure-key-vault.refresh-period,omitempty
+| string
+| If Refresh is enabled, the connection String to point to the Eventhub service used to track updates
+
+| azure-key-vault.refresh-period,omitempty
+| string
+| If Refresh is enabled, the account name for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
+
+| azure-key-vault.refresh-period,omitempty
+| string
+| If Refresh is enabled, the access key for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
+
+| azure-key-vault.refresh-period,omitempty
+| string
+| If Refresh is enabled, the container name for Azure Storage Blob service used to save checkpoint while consuming from Eventhub
+
|===
// End of autogenerated code - DO NOT EDIT! (configuration)
diff --git a/resources/traits.yaml b/resources/traits.yaml
index 8ce2539f3..a9b276abc 100755
--- a/resources/traits.yaml
+++ b/resources/traits.yaml
@@ -146,6 +146,36 @@ traits:
- name: vault-name,omitempty
type: string
description: The Azure Vault Name for accessing Key Vault
+ - 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, the connection String to point to the Eventhub
+ service used to track updates
+ - name: refresh-period,omitempty
+ type: string
+ description: If Refresh is enabled, the account name for Azure Storage Blob service
+ used to save checkpoint while consuming from Eventhub
+ - name: refresh-period,omitempty
+ type: string
+ description: If Refresh is enabled, the access key for Azure Storage Blob service
+ used to save checkpoint while consuming from Eventhub
+ - name: refresh-period,omitempty
+ type: string
+ description: If Refresh is enabled, the container name for Azure Storage Blob
+ service used to save checkpoint while consuming from Eventhub
- name: builder
platform: true
profiles:
[camel-k] 04/04: feature(#3903): Support secret refresh through the existing addons - Azure Key Vault - 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 aa94a94877fe5d476adbee7899adf64dc814e516
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 13 18:20:32 2023 +0100
feature(#3903): Support secret refresh through the existing addons - Azure Key Vault - Validate
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
addons/vault/azure/azure_key_vault.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/vault/azure/azure_key_vault.go b/addons/vault/azure/azure_key_vault.go
index 429858c0b..cb383dbc3 100644
--- a/addons/vault/azure/azure_key_vault.go
+++ b/addons/vault/azure/azure_key_vault.go
@@ -18,12 +18,13 @@ limitations under the License.
package azure
import (
+ "strconv"
+
v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
traitv1 "github.com/apache/camel-k/pkg/apis/camel/v1/trait"
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util"
"k8s.io/utils/pointer"
- "strconv"
)
// The Azure Key Vault trait can be used to use secrets from Azure Key Vault service