Files
gh-ahmedasmar-devops-claude…/assets/applicationsets/cluster-generator.yaml
2025-11-29 17:51:15 +08:00

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