Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/Proposal: Accept hook names in helm.sh/hook-delete-policy #3128

Closed
jgiles opened this issue Nov 11, 2017 · 4 comments
Closed

Feature/Proposal: Accept hook names in helm.sh/hook-delete-policy #3128

jgiles opened this issue Nov 11, 2017 · 4 comments

Comments

@jgiles
Copy link

jgiles commented Nov 11, 2017

Currently, you can easily delete a hook resource immediately after its execution:
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-delete-policy": hook-failed
Or, though this is currently missing in the docs at docs/charts_hooks.md:
"helm.sh/hook-delete-policy": "hook-succeeded,hook-failed"
(according to comments in #2692)

However, it's a pretty common case to want to delete the resource later - most often, on running helm delete (which otherwise does not delete hook resources).

This is addressed in the documentation here, but the proposed workaround is painful: Users need to create some container image to do resource deletion, package it into a Job, and make that Job a hook. In practice, this leads to issues like #2777.

Proposal: support the specification of hook names (e.g. post-install,pre-delete,post-delete) which would do the deletion during the named hook.

The downside to specifying these in "helm.sh/hook-delete-policy" is that there would be no good way to specify a weight. It could always use 0, or some high weight to always go "last" (since the deletion is an async clean-up operation, it probably doesn't make sense to rely on it being scheduled "before" anything else). Or, we could add some new field(s) to more properly support hook specification.

I expect this could be tricky to implement and might be more properly addressed with Stages (#2243), but that looks like it might not happen/be a long ways off.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@jgiles
Copy link
Author

jgiles commented Mar 21, 2018

@bacongobbler any chance of getting some eyes on this?

@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants