From 7f71b4717a32259cccaadc0a4d0986963604e2ce Mon Sep 17 00:00:00 2001 From: Mike Tougeron Date: Sun, 21 Jul 2024 12:37:48 -0700 Subject: [PATCH] Update docs for namespaceSelectors usage and namespaceSelector deprecation (#3695) Signed-off-by: Mike Tougeron --- docs/api/clusterexternalsecret.md | 9 ++++++++- docs/snippets/full-cluster-external-secret.yaml | 13 +++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/api/clusterexternalsecret.md b/docs/api/clusterexternalsecret.md index 59ec8528f16..ea2e688901b 100644 --- a/docs/api/clusterexternalsecret.md +++ b/docs/api/clusterexternalsecret.md @@ -2,7 +2,7 @@ The `ClusterExternalSecret` is a cluster scoped resource that can be used to manage `ExternalSecret` resources in specific namespaces. -With `namespaceSelector` you can select namespaces in which the ExternalSecret should be created. +With `namespaceSelectors` you can select namespaces in which the ExternalSecret should be created. If there is a conflict with an existing resource the controller will error out. ## Example @@ -12,3 +12,10 @@ Below is an example of the `ClusterExternalSecret` in use. ```yaml {% include 'full-cluster-external-secret.yaml' %} ``` + +## Deprecations + +### namespaceSelector + +The field `namespaceSelector` has been deprecated in favor of `namespaceSelectors` and will be removed in a future +version. diff --git a/docs/snippets/full-cluster-external-secret.yaml b/docs/snippets/full-cluster-external-secret.yaml index 94a6ea1f2da..caef33679b5 100644 --- a/docs/snippets/full-cluster-external-secret.yaml +++ b/docs/snippets/full-cluster-external-secret.yaml @@ -9,8 +9,17 @@ spec: # This is a basic label selector to select the namespaces to deploy ExternalSecrets to. # you can read more about them here https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements - namespaceSelector: - matchLabels: + # Deprecated: Use namespaceSelectors instead. + # namespaceSelector: + # matchLabels: + # cool: label + + # This is a list of basic label selector to select the namespaces to deploy ExternalSecrets to. + # you can read more about them here https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements + # The list is OR'd together, so if any of the namespaceSelectors match the namespace, + # the ExternalSecret will be deployed to that namespace. + namespaceSelectors: + - matchLabels: cool: label # How often the ClusterExternalSecret should reconcile itself