Skip to content

Commit 563ce0e

Browse files
committed
Extended VaultSecret definition by a specification of additionals labels for the created secret.
1 parent d7b3248 commit 563ce0e

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

api/v1alpha1/groupversion_info.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// limitations under the License.
1414

1515
// Package v1alpha1 contains API Schema definitions for the vault.finleap.cloud v1alpha1 API group
16-
//+kubebuilder:object:generate=true
17-
//+groupName=vault.finleap.cloud
16+
// +kubebuilder:object:generate=true
17+
// +groupName=vault.finleap.cloud
1818
package v1alpha1
1919

2020
import (

api/v1alpha1/vaultsecret_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ type VaultSecretSpec struct {
131131
// Array of vault path references where to gather data from for the secret.
132132
// +optional
133133
DataFrom []VaultSecretDataRef `json:"dataFrom,omitempty"`
134+
// Array of labels for the created secret.
135+
// +optional
136+
SecretLabels map[string]string `json:"secretLabels,omitempty"`
134137
}
135138

136139
// VaultSecretStatus defines the observed state of VaultSecret

api/v1alpha1/zz_generated.deepcopy.go

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/vault-operator/templates/crds.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if .Values.deployCRDs }}
21
# Generated by 'make manifests'
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
@@ -183,6 +182,11 @@ spec:
183182
- path
184183
type: object
185184
type: array
185+
secretLabels:
186+
additionalProperties:
187+
type: string
188+
description: Array of labels for the created secret.
189+
type: object
186190
secretName:
187191
description: Optional name of secret which is created by this object.
188192
type: string
@@ -239,4 +243,3 @@ status:
239243
plural: ""
240244
conditions: []
241245
storedVersions: []
242-
{{- end }}

config/crd/bases/vault.finleap.cloud_vaultsecrets.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ spec:
169169
- path
170170
type: object
171171
type: array
172+
secretLabels:
173+
additionalProperties:
174+
type: string
175+
description: Array of labels for the created secret.
176+
type: object
172177
secretName:
173178
description: Optional name of secret which is created by this object.
174179
type: string

0 commit comments

Comments
 (0)