Back to results for “Sync Waves & Hooks”
ArgoCD › Sync Waves & Hooks

How do sync waves and hooks interact?

Intermediate

Answer

Hooks also honor sync waves, so you can order hooks relative to each other and to resources. Within a phase, waves determine order. PreSync hooks run (in wave order) before Sync-phase resources; PostSync hooks run after all Sync resources are Healthy. This lets you build precise ordered pipelines within a single sync.
metadata:
  annotations:
    argocd.argoproj.io/hook: PreSync
    argocd.argoproj.io/sync-wave: "-2"
Real-world example Two PreSync hooks run in wave order—first provisioning, then migration—before the app resources apply.

Common follow-ups: Do hooks respect sync waves? | How do you order multiple hooks?