Advertisement
Intermediate ArgoCD, Sync Waves & Hooks

How do sync waves and hooks interact?

Short 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.

Save ArgoCD mock interview
Advertisement
AModel 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.
Likely follow-ups
  • Do hooks respect sync waves? | How do you order multiple hooks?
Related topics