What are the hook deletion policy options?
Short 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.
Advertisement
AModel 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: HookSucceededReal-world example
Successful migration Jobs are auto-deleted so old completed Jobs don't clutter the namespace.
Likely follow-ups
- Why use BeforeHookCreation? | What happens with no delete policy?
Related topics