forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Post Selector moved to Generators section (argoproj#11109)
- Loading branch information
Showing
4 changed files
with
47 additions
and
37 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
docs/operator-manual/applicationset/Generators-Post-Selector.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Post Selector all generators | ||
|
||
The Selector allows to post-filter based on generated values using the kubernetes common labelSelector format. In the example, the list generator generates a set of two application which then filter by the key value to only select the `env` with value `staging`: | ||
|
||
## Example: List generator + Post Selector | ||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: ApplicationSet | ||
metadata: | ||
name: guestbook | ||
spec: | ||
generators: | ||
- list: | ||
elements: | ||
- cluster: engineering-dev | ||
url: https://kubernetes.default.svc | ||
env: staging | ||
- cluster: engineering-prod | ||
url: https://kubernetes.default.svc | ||
env: prod | ||
selector: | ||
matchLabels: | ||
env: staging | ||
template: | ||
metadata: | ||
name: '{{cluster}}-guestbook' | ||
spec: | ||
project: default | ||
source: | ||
repoURL: https://github.com/argoproj-labs/applicationset.git | ||
targetRevision: HEAD | ||
path: examples/list-generator/guestbook/{{cluster}} | ||
destination: | ||
server: '{{url}}' | ||
namespace: guestbook | ||
``` | ||
The List generator + Post Selector generates a single set of parameters: | ||
```yaml | ||
- cluster: engineering-dev | ||
url: https://kubernetes.default.svc | ||
env: staging | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters