-
Notifications
You must be signed in to change notification settings - Fork 59
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
Configmaps and Secrets annotated by default hooks cannot be uninstalled #44
Comments
Hi, @GRomR1. Thank you for pointing out this problem. Yes, it is a known problem, and it seems to us to be the lesser of the evils. If your hooks, for example with migration, need variables from secrets or configmaps, you can get a whole range of problems:
That's why we use this approach. |
Maybe it worth to use alternative approach: dont mark configmap/secrets as hook by default, but add optional flag to generate second, "hooked" version of object? Migration jobs will able to use "hooked" configmap/secrets AND chart uninstalling will remove non-hooked ones. |
Hi, @evgkrsk. Thanks for the idea. We've been discussing this too, and it seems there are no better options at the moment. |
Agree with @evgkrsk. To me the best option is don't setup this hook annotations because the hook job is an option. Someone like us prefer to run migrations in CI and don't use migration job. And this annotations was clutter up our cluster in review-stands. |
Okay, let's try this approach. |
@randreev1321 push an additional commit 7860171 that will merge hookAnnotations with genericAnnotations approve plz |
Any updates? |
Now helm hooks are added by default to all resources like ConfigMap and Secret. It makes a problem with manage them in helm releases. ConfigMap with hooks cannot be tracked and removed while uninstall a release.
The helm creators know about that. They write about it here.
The solution could be
helm.sh/hook-delete-policy
but it is not possible to apply for regular resources to store data (ConfigMap, Secrets).I think this default behavior should be changed. Should be a possibility to add hooks manually where it really needs. And should stop add hooks in all configmaps and secrets by default.
The text was updated successfully, but these errors were encountered: