Argo CD 3 · Declarative setup
Generate applications from a list
An ApplicationSet creates one Application per element, for example per environment.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: web-envs
namespace: argocd
spec:
generators:
- list:
elements:
- env: staging
- env: production
template:
metadata:
name: 'web-{{env}}'
spec:
project: default
source:
repoURL: https://github.com/example/deploy-repo.git
targetRevision: main
path: 'envs/{{env}}'
destination:
server: https://kubernetes.default.svc
namespace: 'web-{{env}}'
syncPolicy:
automated: {}
Official Argo CD 3 documentation