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

How do hooks differ from plain resources with sync waves, and when do you choose each?

Advanced

Answer

Sync waves order the ongoing desired-state resources that ArgoCD keeps reconciled. Hooks are transient, run per-sync (often deleted afterward), and tie to phases/failure—ideal for imperative one-off tasks like migrations or tests. Use waves for ordering persistent resources; use hooks for actions that should run around a sync but not be permanently managed.
Real-world example Persistent components use waves for ordering, while a one-time cache warm-up runs as a PostSync hook that's deleted after success.

Common follow-ups: Why are hooks better for one-off tasks? | Are hooks part of the desired state?