Browse Source

Add Kind to ExternalSecret.spec.secretStoreRef

Jonatas Baldin 5 years ago
parent
commit
3546ee0661

+ 6 - 1
api/v1alpha1/externalsecret_types.go

@@ -21,8 +21,13 @@ import (
 
 
 // SecretStoreRef defines which SecretStore to fetch the ExternalSecret data
 // SecretStoreRef defines which SecretStore to fetch the ExternalSecret data
 type SecretStoreRef struct {
 type SecretStoreRef struct {
-	// Name of the ExternalSecret resource
+	// Name of the SecretStore resource
 	Name string `json:"name"`
 	Name string `json:"name"`
+
+	// Kind of the SecretStore resource (SecretStore or ClusterSecretStore)
+	// Defaults to `SecretStore`
+	// +optional
+	Kind string `json:"kind,omitempty"`
 }
 }
 
 
 // ExternalSecretCreationPolicy defines rules on how to create the resulting Secret
 // ExternalSecretCreationPolicy defines rules on how to create the resulting Secret

+ 1 - 0
config/samples/external-secrets_v1alpha1_externalsecret.yaml

@@ -5,6 +5,7 @@ metadata:
 spec:
 spec:
   secretStoreRef:
   secretStoreRef:
     name: secretstore-sample
     name: secretstore-sample
+    kind: SecretStore
 
 
   target:
   target:
     name: secret-to-be-created
     name: secret-to-be-created