33 lines
771 B
YAML
33 lines
771 B
YAML
# ApplicationSet with Cluster Generator
|
|
# Automatically deploys to all clusters matching label selector
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: ApplicationSet
|
|
metadata:
|
|
name: cluster-apps
|
|
namespace: argocd
|
|
spec:
|
|
goTemplate: true
|
|
generators:
|
|
- cluster:
|
|
selector:
|
|
matchLabels:
|
|
environment: production
|
|
template:
|
|
metadata:
|
|
name: '{{.name}}-guestbook'
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: https://github.com/argoproj/argocd-example-apps
|
|
targetRevision: HEAD
|
|
path: guestbook
|
|
destination:
|
|
server: '{{.server}}'
|
|
namespace: guestbook
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
syncOptions:
|
|
- CreateNamespace=true
|