Skip to content

Commit

Permalink
Update docs for namespaceSelectors usage and namespaceSelector deprec…
Browse files Browse the repository at this point in the history
…ation (external-secrets#3695)

Signed-off-by: Mike Tougeron <[email protected]>
  • Loading branch information
mtougeron authored Jul 21, 2024
1 parent fb020db commit 7f71b47
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
9 changes: 8 additions & 1 deletion docs/api/clusterexternalsecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
13 changes: 11 additions & 2 deletions docs/snippets/full-cluster-external-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f71b47

Please sign in to comment.