helm icon indicating copy to clipboard operation
helm copied to clipboard

confusion with "*-delete" hooks and suggestion

Open salamando opened this issue 7 years ago • 3 comments

Output of helm version: SemVer:"v2.12.3" Output of kubectl version: v1.9.7

Hi I'm confused with "*-delete" like "pre-delete" - "Executes on a deletion request before any resources are deleted from Kubernetes." from https://github.com/helm/helm/blob/master/docs/charts_hooks.md

Expected Delete the hook before any resources are deleted from Kubernetes.

Happend tiller.log "Release test-helm pre-delete chart/templates/crd-resource.yaml failed: myplugin.configuration.mycrd.com "acl-crd-resource-helm" already exists." It seems tiller execute a create option by "pre-delete" hooks.

Then I want to delete them by "helm.sh/hook-delete-policy", there are only three choice "hook-succeeded" specifies Tiller should delete the hook after the hook is successfully executed. "hook-failed" specifies Tiller should delete the hook if the hook failed during execution. "before-hook-creation" specifies Tiller should delete the previous hook before the new hook is launched."

I can't delete hooks when I delete the release with annotation.

Is there any plan to add a hook annotation like "helm.sh/hook-delete-policy:after-delete"? So that I can delete the hooks when I delete the release. Or there is already some method to solve this?

Thanks for your help.

Best wishes.

salamando avatar Feb 27 '19 08:02 salamando

Hi , Is there anyone have the same confusion with me?

salamando avatar Mar 07 '19 01:03 salamando

Is the documentation insufficient to answer your question? I'm not sure what you are trying to achieve. Perhaps if you had a demonstration that clearly explained how you are trying to delete the hook using a pre-delete hook, that would help us better understand the problem you are attempting to solve. Thanks!

bacongobbler avatar Mar 07 '19 02:03 bacongobbler

I'm going to close this ticket due to inactivity, but please re-open if this still needs to be addressed. Thanks!

bacongobbler avatar Dec 09 '19 20:12 bacongobbler