ArgoCD › Sync Waves & Hooks

What are resource hooks in ArgoCD?

Beginner

Answer

Hooks are resources (usually Jobs or Pods) that run at specific points in a sync to perform tasks like migrations, tests, or notifications. They're marked with `argocd.argoproj.io/hook` and a phase (PreSync, Sync, PostSync, SyncFail, Skip). ArgoCD runs them at the right time and tracks their success as part of the sync.
metadata:
  annotations:
    argocd.argoproj.io/hook: PreSync
Real-world example A PreSync Job runs database migrations before the new application version is deployed.

Common follow-ups: What resource types are used as hooks? | What phases exist?