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 c764351f17e8849deee87d9bb47e212577242d51 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Sep 29 11:48:05 2022 +0200 Added docs about GCP Secret Manager Vault Trait --- addons/vault/gcp/zz_desc_generated.go | 1 + addons/vault/gcp/zz_generated_doc.go | 1 + docs/modules/ROOT/nav.adoc | 1 + docs/modules/traits/pages/gcp-secret-manager.adoc | 54 +++++++++++++++++++++++ pkg/resources/resources.go | 4 +- resources/traits.yaml | 33 ++++++++++++++ script/gen_doc.sh | 3 +- 7 files changed, 94 insertions(+), 3 deletions(-) diff --git a/addons/vault/gcp/zz_desc_generated.go b/addons/vault/gcp/zz_desc_generated.go new file mode 100644 index 000000000..67580e41e --- /dev/null +++ b/addons/vault/gcp/zz_desc_generated.go @@ -0,0 +1 @@ +package gcp diff --git a/addons/vault/gcp/zz_generated_doc.go b/addons/vault/gcp/zz_generated_doc.go new file mode 100644 index 000000000..67580e41e --- /dev/null +++ b/addons/vault/gcp/zz_generated_doc.go @@ -0,0 +1 @@ +package gcp diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index d03ac1ffa..51c8c2987 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -63,6 +63,7 @@ ** xref:traits:environment.adoc[Environment] ** xref:traits:error-handler.adoc[Error Handler] ** xref:traits:gc.adoc[Gc] +** xref:traits:gcp-secret-manager.adoc[Gcp Secret Manager] ** xref:traits:health.adoc[Health] ** xref:traits:ingress.adoc[Ingress] ** xref:traits:istio.adoc[Istio] diff --git a/docs/modules/traits/pages/gcp-secret-manager.adoc b/docs/modules/traits/pages/gcp-secret-manager.adoc new file mode 100644 index 000000000..bcf73ea8d --- /dev/null +++ b/docs/modules/traits/pages/gcp-secret-manager.adoc @@ -0,0 +1,54 @@ += Gcp Secret Manager Trait + +// Start of autogenerated code - DO NOT EDIT! (description) +The Google Secret Manager trait can be used to use secrets from Google Secret Manager + +The Google Secret Manager trait is disabled by default. + +For more information about how to use secrets from Google Secret Manager take a look at the components docs: xref:components::google-secret-manager-component.adoc[AWS Secrets Manager component] + +A sample execution of this trait, would require +the following trait options: +-t gpc-secret-manager.enabled=true -t gpc-secret-manager.project-id="project-id" -t gpc-secret-manager.service-account-key="file:serviceaccount.json" + + +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 gcp-secret-manager.[key]=[value] --trait gcp-secret-manager.[key2]=[value2] integration.groovy +---- +The following configuration options are available: + +[cols="2m,1m,5a"] +|=== +|Property | Type | Description + +| gcp-secret-manager.enabled +| bool +| Can be used to enable or disable a trait. All traits share this common property. + +| gcp-secret-manager.auto +| bool +| Enables automatic configuration of the trait. + +| gcp-secret-manager.project-id,omitempty +| string +| The Project Id from Google Cloud + +| gcp-secret-manager.service-account-key,omitempty +| string +| The Path to a service account Key File to use secrets from Google Secret Manager + +| gcp-secret-manager.use-default-instance,omitempty +| bool +| Define if we want to use the Default Instance approach for accessing the Google Secret Manager service + +|=== + +// End of autogenerated code - DO NOT EDIT! (configuration) diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go index cec9cabf0..45fcd718f 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: 56535, + uncompressedSize: 54492, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x7d\xfd\x73\x1b\x37\xb2\xe0\xef\xf9\x2b\x50\x7a\xf7\x4a\x92\x8b\xa4\x94\xec\xcb\xbe\x3c\xdd\xf9\xed\x29\xb6\xb3\xab\xc4\x1f\x3a\x4b\xc9\xbe\x2d\x9f\x6b\x09\xce\x80\x24\xcc\x19\x60\x02\x60\x24\x33\xf7\xee\x7f\xbf\x42\x77\xe3\x63\x86\x43\x91\xb2\xad\xdc\xea\xea\x36\x55\x6b\x91\x9c\x01\x1a\x8d\x46\xa3\xbf\xdb\x19\x2e\x9d\x3d\xfb\x6a\xcc\x14\xaf\xc5\x19\xfb\x83\x2d\x78\x25\xbe\x62\xac\xa9\xb8\x9b\x6b\x53\x9f\xb1\x39\x [...] + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7d\x73\x1b\xb9\xd1\x20\xfe\xff\x7e\x0a\x94\xf2\x7b\x4a\x92\x8b\xa4\xb4\x9b\x67\x93\xfd\xe9\xce\x4f\x4e\x6b\x7b\x13\xed\xfa\x45\x67\x69\x37\x4f\xca\xe7\x0a\xc1\x19\x90\x84\x39\x03\x4c\x00\x8c\x64\xee\xe5\xbe\xfb\x15\xba\x1b\x2f\x33\x1c\x8a\x94\x6d\xed\x45\x57\x97\xad\x8a\x45\x72\xa6\xd1\x68\x34\x1a\xfd\x0e\x67\xb8\x74\xf6\xec\xab\x31\x53\xbc\x16\x67\xec\xf7\xb6\xe0\x95\xf8\x8a\xb1\xa6\xe2\x6e\xae\x4d\x7d\xc6\x [...] }, } fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{ diff --git a/resources/traits.yaml b/resources/traits.yaml index 334f399fb..63219a939 100755 --- a/resources/traits.yaml +++ b/resources/traits.yaml @@ -442,6 +442,39 @@ traits: type: github.com/apache/camel-k/pkg/apis/camel/v1/trait.DiscoveryCacheType description: Discovery client cache to be used, either `disabled`, `disk` or `memory` (default `memory`) +- name: gcp-secret-manager + platform: false + profiles: + - Kubernetes + - Knative + - OpenShift + description: 'The Google Secret Manager trait can be used to use secrets from Google + Secret Manager The Google Secret Manager trait is disabled by default. For more + information about how to use secrets from Google Secret Manager take a look at + the components docs: xref:components::google-secret-manager-component.adoc[AWS + Secrets Manager component] A sample execution of this trait, would require the + following trait options: -t gpc-secret-manager.enabled=true -t gpc-secret-manager.project-id="project-id" + -t gpc-secret-manager.service-account-key="file:serviceaccount.json"' + 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: project-id,omitempty + type: string + description: The Project Id from Google Cloud + - name: service-account-key,omitempty + type: string + description: The Path to a service account Key File to use secrets from Google + Secret Manager + - name: use-default-instance,omitempty + type: bool + description: Define if we want to use the Default Instance approach for accessing + the Google Secret Manager service +>>>>>>> 086b55a6 (Added docs about GCP Secret Manager Vault Trait) - name: health platform: false profiles: diff --git a/script/gen_doc.sh b/script/gen_doc.sh index 686b47eea..319b37046 100755 --- a/script/gen_doc.sh +++ b/script/gen_doc.sh @@ -30,5 +30,6 @@ go run ./cmd/util/doc-gen \ --input-dirs github.com/apache/camel-k/addons/master \ --input-dirs github.com/apache/camel-k/addons/threescale \ --input-dirs github.com/apache/camel-k/addons/tracing \ - --input-dirs github.com/apache/camel-k/addons/vault/aws + --input-dirs github.com/apache/camel-k/addons/vault/aws \ + --input-dirs github.com/apache/camel-k/addons/vault/gcp echo "Generating traits documentation... done!"