This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch release-1.10.x in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 610303fadb52ae8249892b3d19503ce63f49b8c4 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Wed Sep 28 13:37:14 2022 +0200 Added docs for AWS Secrets Manager Vault from Camel --- addons/vault/aws/aws_secrets_manager.go | 1 - docs/modules/ROOT/nav.adoc | 1 + docs/modules/traits/pages/aws-secrets-manager.adoc | 57 ++++++++++++++++++++++ pkg/resources/resources.go | 4 +- resources/traits.yaml | 32 ++++++++++++ 5 files changed, 92 insertions(+), 3 deletions(-) diff --git a/addons/vault/aws/aws_secrets_manager.go b/addons/vault/aws/aws_secrets_manager.go index 80f401e30..dfb2e22f1 100644 --- a/addons/vault/aws/aws_secrets_manager.go +++ b/addons/vault/aws/aws_secrets_manager.go @@ -36,7 +36,6 @@ import ( // -t aws-secrets-manager.enabled=true -t aws-secrets-manager.access-key="aws-access-key" -t aws-secrets-manager.secret-key="aws-secret-key" -t aws-secrets-manager.region="aws-region" // // +camel-k:trait=aws-secrets-manager. - type Trait struct { traitv1.Trait `property:",squash"` // Enables automatic configuration of the trait. diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index d209dd259..d03ac1ffa 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -52,6 +52,7 @@ // Start of autogenerated code - DO NOT EDIT! (trait-nav) ** xref:traits:3scale.adoc[3scale] ** xref:traits:affinity.adoc[Affinity] +** xref:traits:aws-secrets-manager.adoc[Aws Secrets Manager] ** xref:traits:builder.adoc[Builder] ** xref:traits:camel.adoc[Camel] ** xref:traits:container.adoc[Container] diff --git a/docs/modules/traits/pages/aws-secrets-manager.adoc b/docs/modules/traits/pages/aws-secrets-manager.adoc new file mode 100644 index 000000000..0b65c1d28 --- /dev/null +++ b/docs/modules/traits/pages/aws-secrets-manager.adoc @@ -0,0 +1,57 @@ += Aws Secrets Manager Trait + +// Start of autogenerated code - DO NOT EDIT! (description) +The Secrets Manager trait can be used to use secrets from AWS Secrets Manager + +The AWS Secrets Manager trait is disabled by default. + +A sample execution of this trait, would require +the following trait options: +-t aws-secrets-manager.enabled=true -t aws-secrets-manager.access-key="aws-access-key" -t aws-secrets-manager.secret-key="aws-secret-key" -t aws-secrets-manager.region="aws-region" + + +This trait is available in the following profiles: **Kubernetes, Knative, OpenShift**. + +// End of autogenerated code - DO NOT EDIT! (description) +// Start of autogenerated code - DO NOT EDIT! (configuration) +== Configuration + +Trait properties can be specified when running any integration with the CLI: +[source,console] +---- +$ kamel run --trait aws-secrets-manager.[key]=[value] --trait aws-secrets-manager.[key2]=[value2] integration.groovy +---- +The following configuration options are available: + +[cols="2m,1m,5a"] +|=== +|Property | Type | Description + +| aws-secrets-manager.enabled +| bool +| Can be used to enable or disable a trait. All traits share this common property. + +| aws-secrets-manager.auto +| bool +| Enables automatic configuration of the trait. + +| aws-secrets-manager.access-key,omitempty +| string +| The AWS Access Key to use + +| aws-secrets-manager.secret-key,omitempty +| string +| The AWS Secret Key to use + +| aws-secrets-manager.region,omitempty +| string +| The AWS Region to use + +| aws-secrets-manager.use-default-credentials-provider,omitempty +| bool +| The adapter-specific policy to use when filling the cache (use: minimizing / maximizing). Check +the component documentation if unsure + +|=== + +// End of autogenerated code - DO NOT EDIT! (configuration) diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go index da5f0b800..fd82a9cb0 100644 --- a/pkg/resources/resources.go +++ b/pkg/resources/resources.go @@ -170,9 +170,9 @@ var assets = func() http.FileSystem { "/manager/operator-deployment.yaml": &vfsgen۰CompressedFileInfo{ name: "operator-deployment.yaml", modTime: time.Time{}, - uncompressedSize: 2725, + uncompressedSize: 2752, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x56\x4f\x8f\xe2\xc6\x13\xbd\xfb\x53\x3c\xe1\xcb\xae\x34\xc3\x9f\x3d\xad\xfc\x3b\xf9\x37\x30\x59\x94\x09\x20\xcc\x66\xb4\xa7\xa8\x69\x17\xb8\x45\xbb\xdb\xe9\x2e\xc3\x92\x4f\x1f\xb5\xc1\x0c\x30\x7f\xb2\x1b\x8d\x14\x9f\xb0\xab\xea\xd5\x7b\xaf\xaa\x6d\x62\xdc\xbe\xdf\x15\xc5\x78\x50\x92\x8c\xa7\x1c\x6c\xc1\x05\x21\xad\x84\x2c\x08\x99\x5d\xf1\x4e\x38\xc2\xbd\xad\x4d\x2e\x58\x59\x83\x0f\x69\x76\xff\x11\xb5\xc9\xc9\xc1\x [...] + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x56\x4d\x8f\xe2\x46\x10\xbd\xfb\x57\x3c\xe1\xcb\xae\x34\x98\x61\x4f\x2b\xe7\xe4\x0c\x4c\xd6\xca\xc6\x20\xcc\x66\xb4\xa7\xa8\x69\x17\x76\x8b\x76\xb7\xd3\xdd\x86\x25\xbf\x3e\x6a\x83\x19\x60\x3e\x92\x89\x46\x8a\x4f\xd8\x55\xf5\xea\xd5\x7b\xd5\x36\x21\x86\xef\x77\x05\x21\xbe\x0a\x4e\xca\x52\x01\xa7\xe1\x2a\x42\xd2\x30\x5e\x11\x72\xbd\x76\x3b\x66\x08\xf7\xba\x55\x05\x73\x42\x2b\x7c\x48\xf2\xfb\x8f\x68\x55\x41\x06\x5a\x [...] }, "/manager/operator-service-account.yaml": &vfsgen۰CompressedFileInfo{ name: "operator-service-account.yaml", diff --git a/resources/traits.yaml b/resources/traits.yaml index 2f52eb1dc..5d0383c68 100755 --- a/resources/traits.yaml +++ b/resources/traits.yaml @@ -65,6 +65,38 @@ traits: description: Defines a set of pods (namely those matching the label selector, relative to the given namespace) that the integration pod(s) should not be co-located with. +- name: aws-secrets-manager + platform: false + profiles: + - Kubernetes + - Knative + - OpenShift + description: 'The Secrets Manager trait can be used to use secrets from AWS Secrets + Manager The AWS Secrets Manager trait is disabled by default. A sample execution + of this trait, would require the following trait options: -t aws-secrets-manager.enabled=true + -t aws-secrets-manager.access-key="aws-access-key" -t aws-secrets-manager.secret-key="aws-secret-key" + -t aws-secrets-manager.region="aws-region"' + properties: + - name: enabled + type: bool + description: Can be used to enable or disable a trait. All traits share this common + property. + - name: auto + type: bool + description: Enables automatic configuration of the trait. + - name: access-key,omitempty + type: string + description: The AWS Access Key to use + - name: secret-key,omitempty + type: string + description: The AWS Secret Key to use + - name: region,omitempty + type: string + description: The AWS Region to use + - name: use-default-credentials-provider,omitempty + type: bool + description: 'The adapter-specific policy to use when filling the cache (use: + minimizing / maximizing). Check the component documentation if unsure' - name: builder platform: true profiles: