-
Notifications
You must be signed in to change notification settings - Fork 331
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
bug: removal of VM k8s chart does not work well. #1563
Comments
hey @gecube |
@AndrewChubatiuk there is a difference between CRD and CR. So let's don't confuse them. CRD - is like an api extension. It's ok if they won't be deleted. As user may installed something additional besides VM stack As an user of chart I am expecting that removal of chart (or even NS) will remove all objects and leave CRDs untouched. |
BTW, on my production I effectively fix this issue just by installing not k8s stack chart with all options enabled, but rather installing three charts:
I tested and it gives more control to the devops team regarding installation/uninstallation and day 2 operations. There are some pitfalls though, but clean-up works well. |
Resources managed by CRs cannot be removed if operator was removed as they are having operator's finalizer. Operator removal cannot be a reason for CRs removal as it can happen due to many reasons, e.g.: deployment spec changes. Order of resources removal is not available in Helm at the moment. So for now you can set a custom |
I think postStop hook and terminationGracePeriodSeconds could help. If we'd add them to operator pods, then it won't be deleted instantly and would have some chance to collect CRs. Unfortunately it is not like a robust solution as there is no strict ordering in helm...
Thanks for the advice. But still sounds like a placebo :-) |
@gecube Thanks for the issue!
But it's not expected to have problems when uninstall k8s-stack release with operator clean up hook enabled. As the VM CRs should be deleted by the vm-operator cleanup job before operator pod gets deleted, so nothing should be blocked. |
added ability to configure |
Good day!
The issue is observed on the all versions of
victoria-metrics-k8s-stack
chart.The steps to reproduce:
victoria-metrics-k8s-stack
victoria-metrics-k8s-stack
is installedTerminating
state.Possible solutions:
Also I got the same result when I tried to remove the
victoria-metrics-k8s-stack
chart without ns deletion.victoria-metrics-k8s-stack
with FluxCDHelmRelease
from gitops repo and/or invokekubectl delete helmrelease -n monitoring-system victoria-metrics-k8s-stack
From written above I am concluding that the process of chart's removal was not testes and it is subject for race conditions (if operator is accidentally removed BEFORE CRs it manages, they stuck).
I am kindly asking to make an investigation and confirm the bug.
The text was updated successfully, but these errors were encountered: