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

What are the hook phases and when does each run?

Intermediate

Answer

PreSync runs before the main sync (e.g., DB migration). Sync runs alongside the normal resources. PostSync runs after all resources are applied and Healthy (e.g., smoke tests, notifications). SyncFail runs if the sync fails (cleanup/alert). Skip means don't apply the resource. Phases let you inject logic around the deployment.
metadata:
  annotations:
    argocd.argoproj.io/hook: PostSync   # smoke tests after deploy
Real-world example A PostSync hook runs integration smoke tests only after the app is deployed and healthy; a SyncFail hook alerts on failure.

Common follow-ups: When does PostSync run relative to health? | What is the SyncFail phase for?