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

What are the hook deletion policy options?

Beginner

Answer

The hook-delete-policy annotation accepts HookSucceeded (delete after success), HookFailed (delete after failure), and BeforeHookCreation (delete the prior hook before creating a new one). They keep completed hook resources from accumulating and manage reruns.
metadata:
  annotations:
    argocd.argoproj.io/hook-delete-policy: HookSucceeded
Real-world example Successful migration Jobs are auto-deleted so old completed Jobs don't clutter the namespace.

Common follow-ups: Why use BeforeHookCreation? | What happens with no delete policy?