Просмотр исходного кода

setting deletionPolicy type as optional

Signed-off-by: Gustavo <gusfcarvalho@gmail.com>
Gustavo 3 лет назад
Родитель
Сommit
213022d8c3

+ 3 - 1
apis/externalsecrets/v1alpha1/pushsecret_types.go

@@ -33,6 +33,7 @@ type PushSecretStoreRef struct {
 	LabelSelector *metav1.LabelSelector `json:"labelSelector"`
 	// Kind of the SecretStore resource (SecretStore or ClusterSecretStore)
 	// Defaults to `SecretStore`
+	// +kubebuilder:default="SecretStore"
 	// +optional
 	Kind string `json:"kind,omitempty"`
 }
@@ -51,7 +52,8 @@ type PushSecretSpec struct {
 	SecretStoreRefs []PushSecretStoreRef `json:"secretStoreRefs"`
 	// Deletion Policy to handle Secrets in the provider. Possible Values: "Delete/None". Defaults to "None".
 	// +kubebuilder:default="None"
-	DeletionPolicy PushSecretDeletionPolicy `json:"deletionPolicy"`
+	// +optional
+	DeletionPolicy PushSecretDeletionPolicy `json:"deletionPolicy,omitempty"`
 	// The Secret Selector (k8s source) for the Push Secret
 	Selector PushSecretSelector `json:"selector"`
 	// Secret Data that should be pushed to providers

+ 1 - 1
config/crds/bases/external-secrets.io_pushsecrets.yaml

@@ -82,6 +82,7 @@ spec:
                 items:
                   properties:
                     kind:
+                      default: SecretStore
                       description: Kind of the SecretStore resource (SecretStore or
                         ClusterSecretStore) Defaults to `SecretStore`
                       type: string
@@ -153,7 +154,6 @@ spec:
                 - secret
                 type: object
             required:
-            - deletionPolicy
             - secretStoreRefs
             - selector
             type: object

+ 1 - 1
deploy/crds/bundle.yaml

@@ -3385,6 +3385,7 @@ spec:
                   items:
                     properties:
                       kind:
+                        default: SecretStore
                         description: Kind of the SecretStore resource (SecretStore or ClusterSecretStore) Defaults to `SecretStore`
                         type: string
                       labelSelector:
@@ -3439,7 +3440,6 @@ spec:
                     - secret
                   type: object
               required:
-                - deletionPolicy
                 - secretStoreRefs
                 - selector
               type: object