Browse Source

Merge pull request #3 from external-secrets/add-kind-and-fix-typos

Add Add Kind to ExternalSecret.spec.secretStoreRef and fix typos
Jonatas Baldin 5 years ago
parent
commit
3b3ce85f63

+ 7 - 2
api/v1alpha1/externalsecret_types.go

@@ -21,8 +21,13 @@ import (
 
 // SecretStoreRef defines which SecretStore to fetch the ExternalSecret data
 type SecretStoreRef struct {
-	// Name of the ExternalSecret resource
+	// Name of the SecretStore resource
 	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
@@ -106,7 +111,7 @@ type ExternalSecretSpec struct {
 	// +optional
 	RefreshInterval string `json:"refreshInterval,omitempty"`
 
-	// Data defines the connection betwen the Kubernetes Secret keys and the Provider data
+	// Data defines the connection between the Kubernetes Secret keys and the Provider data
 	// +optional
 	Data []ExternalSecretData `json:"data,omitempty"`
 

+ 1 - 1
api/v1alpha1/secretstore_awssm_types.go

@@ -30,7 +30,7 @@ type AWSSMAuthSecretRef struct {
 
 // Configures a store to sync secrets using the AWS Secret Manager provider
 type AWSSMProvider struct {
-	// Auth defines the information necessary to authenticate agains AWS
+	// Auth defines the information necessary to authenticate against AWS
 	Auth AWSSMAuth `json:"auth"`
 
 	// Role is a Role ARN which the SecretManager provider will assume

+ 6 - 2
config/crd/bases/external-secrets.x-k8s.io_externalsecrets.yaml

@@ -35,7 +35,7 @@ spec:
           description: ExternalSecretSpec defines the desired state of ExternalSecret
           properties:
             data:
-              description: Data defines the connection betwen the Kubernetes Secret
+              description: Data defines the connection between the Kubernetes Secret
                 keys and the Provider data
               items:
                 description: ExternalSecretData defines the connection between the
@@ -98,8 +98,12 @@ spec:
               description: SecretStoreRef defines which SecretStore to fetch the ExternalSecret
                 data
               properties:
+                kind:
+                  description: Kind of the SecretStore resource (SecretStore or ClusterSecretStore)
+                    Defaults to `SecretStore`
+                  type: string
                 name:
-                  description: Name of the ExternalSecret resource
+                  description: Name of the SecretStore resource
                   type: string
               required:
               - name

+ 1 - 1
config/crd/bases/external-secrets.x-k8s.io_secretstores.yaml

@@ -40,7 +40,7 @@ spec:
               properties:
                 auth:
                   description: Auth defines the information necessary to authenticate
-                    agains AWS
+                    against AWS
                   properties:
                     secretRef:
                       properties:

+ 5 - 3
config/samples/external-secrets_v1alpha1_externalsecret.yaml

@@ -5,6 +5,7 @@ metadata:
 spec:
   secretStoreRef:
     name: secretstore-sample
+    kind: SecretStore
 
   target:
     name: secret-to-be-created
@@ -13,10 +14,11 @@ spec:
   refreshInternal: 1h
 
   data:
-  - secretKey: secret-key-to-be-created
+  - secretKey: secret-key-to-be-managed
     remoteRef:
-      key: remote-key-in-the-provider
-      version: remote-version-in-the-provider
+      key: provider-key
+      version: provider-key-version
+      property: provider-key-property
 
   dataFrom:
   - remoteRef: