What are the hook delete policies?
IntermediateConceptHooks, Tests & Validation
Answer
before-hook-creation: delete the previous hook resource before creating the new one (the default when no policy is set).hook-succeeded: delete after the hook succeeds.hook-failed: delete if it fails.
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
We always include before-hook-creation so the next run does not fail with jobs.batch "shop-migrate" already exists, and we usually omit hook-failed so failed Job pods stay around for kubectl logs.
More on Hooks, Tests & Validation
What are Helm hooks?BeginnerList all hook types and when they run.BeginnerHow do hook weights work?IntermediateAre hook resources part of the release? What happens on uninstall?IntermediateHow does Helm decide a hook is "done"?AdvancedWhy is running a migration as a `pre-install` hook often a mistake?Advanced