Feedback

Chat Icon

GitOps the Hard Way, with Argo CD

Build Real GitOps Pipelines From Empty Clusters to Automated Deploys

Sync Policy: Every Field, Every Sync Option, Every Annotation
47%

Auto-Sync and Self-Healing

Let's now explore the options available in the syncPolicy.automated field.

Here is our previous example as a reminder:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: todo-app
  namespace: argocd
spec:
  destination:
    namespace: default
    server: https://kubernetes.default.svc
  project: default
  source:
    path: manifests
    repoURL: $GITLAB_URL
    targetRevision: main
  # This is the sync policy
  syncPolicy:
    automated:
      selfHeal: true
      allowEmpty: false
  # End of the sync policy

The automated block accepts three boolean fields: prune, selfHeal, and allowEmpty. Before the details, two of these names cause confusion, so here is the distinction up front:

  • automated (the block itself being present) makes Argo CD react to changes in Git: a new commit produces an OutOfSync state, and Argo CD applies it.

GitOps the Hard Way, with Argo CD

Build Real GitOps Pipelines From Empty Clusters to Automated Deploys

Enroll now to unlock all content and receive all future updates for free.