ArgoCD › Sync Waves & Hooks

What is a SyncFail hook and how is it used?

Advanced

Answer

A SyncFail hook runs only when a sync operation fails, used for cleanup, rollback of partial changes, or alerting. It lets you react to failed deployments within the sync lifecycle rather than relying solely on external monitoring.
metadata:
  annotations:
    argocd.argoproj.io/hook: SyncFail
Real-world example On a failed sync, a SyncFail hook cleans up temporary resources and posts an alert to the incident channel.

Common follow-ups: When does SyncFail run? | What tasks suit SyncFail?