Skip to content

Commit

Permalink
Extended VaultSecret definition by a specification of additionals lab…
Browse files Browse the repository at this point in the history
…els for the created secret.

Signed-off-by: Lukas Grundmann <[email protected]>
  • Loading branch information
lukasgr90 committed Jan 6, 2023
1 parent d7b3248 commit b9ace5d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.

// Package v1alpha1 contains API Schema definitions for the vault.finleap.cloud v1alpha1 API group
//+kubebuilder:object:generate=true
//+groupName=vault.finleap.cloud
// +kubebuilder:object:generate=true
// +groupName=vault.finleap.cloud
package v1alpha1

import (
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha1/vaultsecret_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ type VaultSecretSpec struct {
// Array of vault path references where to gather data from for the secret.
// +optional
DataFrom []VaultSecretDataRef `json:"dataFrom,omitempty"`
// Array of labels for the created secret.
// +optional
SecretLabels map[string]string `json:"secretLabels,omitempty"`
}

// VaultSecretStatus defines the observed state of VaultSecret
Expand Down
7 changes: 7 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions charts/vault-operator/templates/crds.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.deployCRDs }}
# Generated by 'make manifests'
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -183,6 +182,11 @@ spec:
- path
type: object
type: array
secretLabels:
additionalProperties:
type: string
description: Array of labels for the created secret.
type: object
secretName:
description: Optional name of secret which is created by this object.
type: string
Expand Down Expand Up @@ -239,4 +243,3 @@ status:
plural: ""
conditions: []
storedVersions: []
{{- end }}
5 changes: 5 additions & 0 deletions config/crd/bases/vault.finleap.cloud_vaultsecrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ spec:
- path
type: object
type: array
secretLabels:
additionalProperties:
type: string
description: Array of labels for the created secret.
type: object
secretName:
description: Optional name of secret which is created by this object.
type: string
Expand Down

0 comments on commit b9ace5d

Please sign in to comment.