Advertisement
Intermediate ArgoCD, Sync Waves & Hooks

Can hooks use sync waves to order among themselves?

Short answer

Yes—hooks honor the sync-wave annotation within their phase, so multiple PreSync hooks can be ordered (e.g., provision in wave -2, migrate in wave -1). This gives fine control over multi-step preparation or teardown sequences inside a single sync.

Save ArgoCD mock interview
Advertisement
AModel answer
Yes—hooks honor the sync-wave annotation within their phase, so multiple PreSync hooks can be ordered (e.g., provision in wave -2, migrate in wave -1). This gives fine control over multi-step preparation or teardown sequences inside a single sync.
metadata:
  annotations:
    argocd.argoproj.io/hook: PreSync
    argocd.argoproj.io/sync-wave: "-1"
Real-world example
Provisioning runs in an earlier PreSync wave than the migration that depends on it.
Likely follow-ups
  • Do hooks respect waves? | How do you order two PreSync hooks?
Related topics