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/07 11:06:50 UTC

[camel-k] branch hashicorp-vault-2 created (now 402ccfa3e)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch hashicorp-vault-2
in repository https://gitbox.apache.org/repos/asf/camel-k.git


      at 402ccfa3e feat(vault): Support Hashicorp Vault as secrets properties source - Generated docs

This branch includes the following new commits:

     new 60e87d429 feat(vault): Support Hashicorp Vault as secrets properties source - Generated docs
     new c3a66bf6e feat(vault): Support Hashicorp Vault as secrets properties source
     new 402ccfa3e feat(vault): Support Hashicorp Vault as secrets properties source - Generated docs

The 3 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.



[camel-k] 03/03: feat(vault): Support Hashicorp Vault as secrets properties source - Generated docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch hashicorp-vault-2
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 402ccfa3e1c24cc61ec29eca58840cfa2f46f6e0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Feb 7 12:06:25 2023 +0100

    feat(vault): Support Hashicorp Vault as secrets properties source - Generated docs
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 docs/modules/ROOT/nav.adoc                     |  1 +
 docs/modules/traits/pages/hashicorp-vault.adoc | 62 ++++++++++++++++++++++
 resources/traits.yaml                          | 72 +++++++++++++-------------
 3 files changed, 99 insertions(+), 36 deletions(-)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index a9919e50a..80376d3fc 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -67,6 +67,7 @@
 ** xref:traits:error-handler.adoc[Error Handler]
 ** xref:traits:gc.adoc[Gc]
 ** xref:traits:gcp-secret-manager.adoc[Gcp Secret Manager]
+** xref:traits:hashicorp-vault.adoc[Hashicorp Vault]
 ** xref:traits:health.adoc[Health]
 ** xref:traits:ingress.adoc[Ingress]
 ** xref:traits:istio.adoc[Istio]
diff --git a/docs/modules/traits/pages/hashicorp-vault.adoc b/docs/modules/traits/pages/hashicorp-vault.adoc
index e69de29bb..7fa9b2cc1 100644
--- a/docs/modules/traits/pages/hashicorp-vault.adoc
+++ b/docs/modules/traits/pages/hashicorp-vault.adoc
@@ -0,0 +1,62 @@
+= Hashicorp Vault Trait
+
+// Start of autogenerated code - DO NOT EDIT! (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"
+
+
+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 hashicorp-vault.[key]=[value] --trait hashicorp-vault.[key2]=[value2] integration.groovy
+----
+The following configuration options are available:
+
+[cols="2m,1m,5a"]
+|===
+|Property | Type | Description
+
+| hashicorp-vault.enabled
+| bool
+| Can be used to enable or disable a trait. All traits share this common property.
+
+| hashicorp-vault.auto
+| bool
+| Enables automatic configuration of the trait.
+
+| hashicorp-vault.host,omitempty
+| string
+| The Host to use
+
+| hashicorp-vault.port,omitempty
+| string
+| The Port to use
+
+| hashicorp-vault.engine,omitempty
+| string
+| The Hashicorp engine to use
+
+| hashicorp-vault.token,omitempty
+| string
+| The token to access Hashicorp Vault
+
+| hashicorp-vault.scheme,omitempty
+| string
+| The scheme to access Hashicorp Vault
+
+|===
+
+// End of autogenerated code - DO NOT EDIT! (configuration)
diff --git a/resources/traits.yaml b/resources/traits.yaml
index a56ea725f..eb8d4f876 100755
--- a/resources/traits.yaml
+++ b/resources/traits.yaml
@@ -99,42 +99,6 @@ 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:
@@ -487,6 +451,42 @@ traits:
     type: bool
     description: Define if we want to use the Default Instance approach for accessing
       the Google Secret Manager service
+- name: hashicorp-vault
+  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: health
   platform: false
   profiles:


[camel-k] 02/03: feat(vault): Support Hashicorp Vault as secrets properties source

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch hashicorp-vault-2
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit c3a66bf6e7258f5ccd7d359c632707c73f1c186f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Feb 7 12:04:14 2023 +0100

    feat(vault): Support Hashicorp Vault as secrets properties source
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 addons/register_hashicorp_vault.go | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/addons/register_hashicorp_vault.go b/addons/register_hashicorp_vault.go
new file mode 100644
index 000000000..563cb1750
--- /dev/null
+++ b/addons/register_hashicorp_vault.go
@@ -0,0 +1,27 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package addons
+
+import (
+	"github.com/apache/camel-k/addons/vault/hashicorp"
+	"github.com/apache/camel-k/pkg/trait"
+)
+
+func init() {
+	trait.AddToTraits(hashicorp.NewHashicorpVaultTrait)
+}


[camel-k] 01/03: feat(vault): Support Hashicorp Vault as secrets properties source - Generated docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch hashicorp-vault-2
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 60e87d4294da6eae203460b6bb761652595c780f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Feb 7 12:02:19 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 -
 pkg/apis/camel/v1/common_types.go         | 4 +++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/addons/vault/hashicorp/hashicorp_vault.go b/addons/vault/hashicorp/hashicorp_vault.go
index 3c7818638..fc2c639e3 100644
--- a/addons/vault/hashicorp/hashicorp_vault.go
+++ b/addons/vault/hashicorp/hashicorp_vault.go
@@ -77,7 +77,7 @@ func (t *hashicorpVaultTrait) Configure(environment *trait.Environment) (bool, e
 
 func (t *hashicorpVaultTrait) Apply(environment *trait.Environment) error {
 	if environment.IntegrationInPhase(v1.IntegrationPhaseInitialization) {
-		util.StringSliceUniqueAdd(&environment.Integration.Status.Capabilities, v1.CapabilityAwsSecretsManager)
+		util.StringSliceUniqueAdd(&environment.Integration.Status.Capabilities, v1.CapabilityHashicorpVault)
 		// Add the Camel Quarkus AWS Secrets Manager
 		util.StringSliceUniqueAdd(&environment.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-hashicorp-vault")
 	}
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 5087a8ad3..a9919e50a 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -55,7 +55,6 @@
 ** 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/pkg/apis/camel/v1/common_types.go b/pkg/apis/camel/v1/common_types.go
index 33eec9f89..f79ce47fc 100644
--- a/pkg/apis/camel/v1/common_types.go
+++ b/pkg/apis/camel/v1/common_types.go
@@ -304,8 +304,10 @@ const (
 	CapabilityAwsSecretsManager = "aws-secrets-manager"
 	// CapabilityGcpSecretManager defines the gcp secret manager capability
 	CapabilityGcpSecretManager = "gcp-secret-manager"
-	// CapabilityGcpSecretManager defines the azure key vault capability
+	// CapabilityAzureKeyVault defines the azure key vault capability
 	CapabilityAzureKeyVault = "azure-key-vault"
+	// CapabilityHashicorpVault defines the Hashicorp Vault capability
+	CapabilityHashicorpVault = "hashicorp-vault"
 )
 
 // +kubebuilder:object:generate=false