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 086b55a63be781dd532e408fa344931b32f03897
Author: Andrea Cosentino <[email protected]>
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 +++++++++++++++++++++++
 resources/traits.yaml                             | 32 ++++++++++++++
 script/gen_doc.sh                                 |  3 +-
 6 files changed, 91 insertions(+), 1 deletion(-)

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 04714ab33..454f040a8 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/resources/traits.yaml b/resources/traits.yaml
index bddc6cf90..3b54c2f9a 100755
--- a/resources/traits.yaml
+++ b/resources/traits.yaml
@@ -442,6 +442,38 @@ 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`). Deprecated: to be removed from trait 
configuration.'
+- 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
 - name: health
   platform: false
   profiles:
diff --git a/script/gen_doc.sh b/script/gen_doc.sh
index b83b23014..ef0679000 100755
--- a/script/gen_doc.sh
+++ b/script/gen_doc.sh
@@ -31,5 +31,6 @@ go run ./cmd/util/doc-gen \
   --input-dirs github.com/apache/camel-k/addons/resume \
   --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!"

Reply via email to