Argo CD 3 · Declarative setup

Define an Application in YAML

Keep applications in Git too. This one deploys a Helm chart folder with automated sync.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: web
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/example/deploy-repo.git
    targetRevision: main
    path: charts/web
    helm:
      valueFiles: [values-prod.yaml]
  destination:
    server: https://kubernetes.default.svc
    namespace: web
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

Official Argo CD 3 documentation

More declarative setup commands

All declarative setup commands · Argo CD 3 cheatsheet

Was this page helpful?