Feedback

Chat Icon

GitOps the Hard Way, with Argo CD

Build Real GitOps Pipelines From Empty Clusters to Automated Deploys

Sync Phases and Hooks: Run Your Own Code Around a Sync
66%

Ordering Within a Phase: Sync Waves

A phase can contain several resources. Suppose you have two PreSync jobs and one has to finish before the other starts. The phase alone does not order them, since they share the PreSync phase. In that case, you need sync waves.

Annotate resources with argocd.argoproj.io/sync-wave, an integer that defaults to 0. Within a phase, Argo CD applies lower waves first and waits for each wave to become healthy before starting the next.

# Wave 0: runs first
metadata:
  generateName: db-migrate-
  annotations:
    argocd.argoproj.io/hook: PreSync
    argocd.argoproj.io/sync-wave: "0"
---

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.