Interview Prep/GitOps & Argo CD/Sync Waves, Hooks, Health & Diffing

What are hook delete policies?

BeginnerConceptSync Waves, Hooks, Health & Diffing
Answer

Set with argocd.argoproj.io/hook-delete-policy:

  • BeforeHookCreation (default): delete the previous hook object just before creating the new one, so the last run stays inspectable.
  • HookSucceeded: delete after success.
  • HookFailed: delete after failure.

Combine them, for example BeforeHookCreation,HookSucceeded. Without BeforeHookCreation, a Job hook with a fixed name fails the next sync because a Job's template is immutable.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Sync Waves, Hooks, Health & Diffing