-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Removing a helm release incorrectly determines the namespace of resources #1558
Comments
Just stumbled upon this one which caused us some major headaches. Imho this is a critical bug, cause it can lead to dataloss when deleting resources in the wrong namespace. This behavior is unnoticed to the user, cause the releases are removed but the resources are not. Or at least not in the right namespace. Imho, this needs a fix ASAP. Quickfix would be to prevent that helm releases can be deleted in k9s. |
@muffl0n Yikes! this is not good indeed. K9s relies on the helm api to delete the chart. So when you issue the delete (aka uninstall) we uninstall the chart using the namespace the chart was installed under. If the chart specifies no explicit namespace then guessing |
It does not use the namespace |
That does not make any sense! The namespace the chart is installed in vs the namespace the chart template uses may not match. The chart must be uninstall in the namespace the chart is currently in, otherwise the uninstall call would fail.
What am I missing? |
I know it sounds completely off. But this behavior matches with the one described in #1033. |
I succeeded to reproduce this behavior: https://github.com/muffl0n/helm-k9s-testcase Let me know if I can be of any further help! |
@muffl0n Sorry Sven I've missed your excellent repro scenario which helped dial this issue in. |
No worries! I'm happy that I could do my part in tackling this behavior! |
* [Maint] Fix race condition issue * [Bug] Fix derailed#2501 * [Maint] Allow reference to resource aliases for plugins * [Feat] Intro cp namespace command + misc cleanup * [Maint] Rev k8s v0.29.1 * [Bug] Fix derailed#1033, derailed#1558 * [Bug] Fix derailed#2527 * [Bug] Fix derailed#2520 * rel v0.31.8
Describe the bug
If the metadata.namespace field is not explicitly specified in the manifest (this is valid when installing releases), then such a manifest will try to search in the default namespace instead of the namespace in which the helm release was installed.
To Reproduce
Install some chart in the namespace other than the default one.
It is mandatory that some (or all) manifests do not explicitly specify the namespace field during the templating process.
Expected behavior
The release must be removed as if it were removed by the original helm application. That is, all installed resources.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: