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/06 13:07:18 UTC
[camel-k] 02/02: feat(vault): Support Hashicorp Vault as secrets properties source - Generated docs
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch hashicorp-vault
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit fd75dcac4226cf7b62fecd476ad8c75230951be4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 6 14:06:51 2023 +0100
feat(vault): Support Hashicorp Vault as secrets properties source - Generated docs
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
addons/vault/hashicorp/hashicorp_vault.go | 2 +-
docs/modules/ROOT/nav.adoc | 1 +
docs/modules/traits/pages/hashicorp-vault.adoc | 0
pkg/resources/resources.go | 4 +--
resources/traits.yaml | 36 ++++++++++++++++++++++++++
script/gen_doc.sh | 3 ++-
6 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/addons/vault/hashicorp/hashicorp_vault.go b/addons/vault/hashicorp/hashicorp_vault.go
index 0419a21a7..3c7818638 100644
--- a/addons/vault/hashicorp/hashicorp_vault.go
+++ b/addons/vault/hashicorp/hashicorp_vault.go
@@ -35,7 +35,7 @@ import (
// the following trait options:
// -t hashicorp-vault.enabled=true -t hashicorp-vault.token="token" -t hashicorp-vault.port="port" -t hashicorp-vault.engine="engine" -t hashicorp-vault.port="port" -t hashicorp-vault.scheme="scheme"
//
-// +camel-k:trait=aws-secrets-manager.
+// +camel-k:trait=hashicorp-vault.
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 a9919e50a..5087a8ad3 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -55,6 +55,7 @@
** xref:traits:3scale.adoc[3Scale]
** xref:traits:affinity.adoc[Affinity]
** xref:traits:aws-secrets-manager.adoc[Aws Secrets Manager]
+** xref:traits:aws-secrets-manager.adoc[Aws Secrets Manager]
** xref:traits:azure-key-vault.adoc[Azure Key Vault]
** xref:traits:builder.adoc[Builder]
** xref:traits:camel.adoc[Camel]
diff --git a/docs/modules/traits/pages/hashicorp-vault.adoc b/docs/modules/traits/pages/hashicorp-vault.adoc
new file mode 100644
index 000000000..e69de29bb
diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index 2bf047ab2..b2920f81a 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: 58334,
+ uncompressedSize: 59727,
- compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xfd\x73\x1c\x37\x92\x20\xfa\xbb\xfe\x0a\x04\xf7\x6d\x90\xd4\xeb\x6e\xca\x9e\xf5\xac\x97\xef\x69\xe7\x68\x59\x9e\xa1\xad\x0f\x9e\x48\x7b\x76\x42\xa7\x98\x46\x57\xa1\xbb\xa1\xae\x02\x6a\x00\x14\xc9\xf6\xed\xfd\xef\x17\xc8\x4c\x7c\x54\x75\x35\xbb\x29\x89\xbe\xe1\xcd\xee\x44\xac\x45\xb2\x90\x48\x24\x12\x89\x44\x7e\x3a\xc3\xa5\xb3\xa7\x4f\xc6\x4c\xf1\x5a\x9c\xb2\xdf\xd9\x82\x57\xe2\x09\x63\x4d\xc5\xdd\x5c\x9b\xfa\x [...]
+ compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xfd\x77\x1b\x37\x92\x28\xfa\xbb\xff\x0a\x1c\xee\xdb\x23\xc9\x8f\xa4\x9c\xcc\x66\x36\xab\xf7\xbc\xf3\x14\xc7\x99\x51\xe2\x0f\x3d\x4b\xc9\xec\x1c\x5f\x9f\x21\xd8\x0d\x92\x30\x9b\x40\x0f\x80\x96\xc4\xdc\xbd\xff\xfb\x3d\xa8\x2a\x7c\x74\xb3\x29\x92\xb6\x95\x1d\xdd\xd9\x99\x73\x62\x91\xec\x2e\x14\x0a\x85\x42\xa1\x3e\x9d\xe1\xd2\xd9\xb3\x27\x23\xa6\xf8\x4a\x9c\xb1\xdf\xd9\x82\x57\xe2\x09\x63\x75\xc5\xdd\x4c\x9b\xd5\x [...]
},
}
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
diff --git a/resources/traits.yaml b/resources/traits.yaml
index a5fef3a9f..a56ea725f 100755
--- a/resources/traits.yaml
+++ b/resources/traits.yaml
@@ -99,6 +99,42 @@ traits:
type: bool
description: Define if we want to use the Default Credentials Provider chain as
authentication method
+- name: aws-secrets-manager
+ platform: false
+ profiles:
+ - Kubernetes
+ - Knative
+ - OpenShift
+ description: 'The Hashicorp Vault trait can be used to use secrets from Hashicorp
+ Vault The Hashicorp Vault trait is disabled by default. For more information about
+ how to use secrets from Hashicorp vault take a look at the components docs: xref:components::hashicorp-vault-component.adoc[Hashicorp
+ Vault component] A sample execution of this trait, would require the following
+ trait options: -t hashicorp-vault.enabled=true -t hashicorp-vault.token="token"
+ -t hashicorp-vault.port="port" -t hashicorp-vault.engine="engine" -t hashicorp-vault.port="port"
+ -t hashicorp-vault.scheme="scheme"'
+ 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: host,omitempty
+ type: string
+ description: The Host to use
+ - name: port,omitempty
+ type: string
+ description: The Port to use
+ - name: engine,omitempty
+ type: string
+ description: The Hashicorp engine to use
+ - name: token,omitempty
+ type: string
+ description: The token to access Hashicorp Vault
+ - name: scheme,omitempty
+ type: string
+ description: The scheme to access Hashicorp Vault
- name: azure-key-vault
platform: false
profiles:
diff --git a/script/gen_doc.sh b/script/gen_doc.sh
index 76982a18b..6594403ca 100755
--- a/script/gen_doc.sh
+++ b/script/gen_doc.sh
@@ -34,5 +34,6 @@ go run ./cmd/util/doc-gen \
--input-dirs github.com/apache/camel-k/addons/telemetry \
--input-dirs github.com/apache/camel-k/addons/vault/aws \
--input-dirs github.com/apache/camel-k/addons/vault/gcp \
- --input-dirs github.com/apache/camel-k/addons/vault/azure
+ --input-dirs github.com/apache/camel-k/addons/vault/azure \
+ --input-dirs github.com/apache/camel-k/addons/vault/hashicorp
echo "Generating traits documentation... done!"