-
Notifications
You must be signed in to change notification settings - Fork 27
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) better handle deleted cluster #734
Conversation
c67b025
to
8518db9
Compare
4886276
to
83d36a2
Compare
When cluster is still present but marked as deleted, Sveltos can avoid removing resources (helm charts and/or kubernetes resources) from such a cluster. Anything else created in the management cluster for such managed cluster still needs to be removed.
83d36a2
to
a041a2d
Compare
Thank you, @gianlucam76, for addressing this. Would it be possible to create a release that includes this change? |
Hi @TheNilesh yes. I was thinking to do release on Monday. Let me know if this is urgent. I can create a temporary tag with this fix Though just to clarify, there was nothing wrong with previous Sveltos behaviour. I added this simply because a bug in the AWS clusterAPI infrastructure provider was not removing a deleted cluster. And so another user ended up with deleted Profile also remaining in the management cluster. With that I mean, that even with 0.39.0 and 0.40.0, if a ClusterAPI cluster is deleted, Sveltos already cleans resources in the management cluster correctly. |
Thank you! A Monday release should work. We’re currently using version v0.39.0 of the Sveltos-addon controller and consistently notice that addons aren’t always removed after a CAPI cluster is deleted. From the logs, it appears Sveltos is still attempting to reach the deleted control plane. It seems that, after a certain number of attempts, it stops trying and leaves the addons in place indefinitely. While my observation could be incorrect, I built a new image of the addon-controller with the commits from this PR, and cleanup worked as expected. Could you please confirm if this fix addresses the same issue or a different one? |
Thanks. For me to properly answer, can you tell me if your deleted CAPI cluster is still present in the management cluster (in deleted state)? |
No, it is gone. |
Thanks. That's strange. If you were deploying just helm charts, v0.39.0 should already have fix. Meaning Sveltos should have correctly removed all resources deployed in the management cluster. In any case, this fix better handles that situation. Sveltos, when detects cluster is marked as deleted (even though still present) does not even try to access it and simply moves forwards removing resources in the management cluster (if any). |
I’m unable to reproduce the issue now. It may be a different problem. If it occurs again, should I create a new GH issue and post logs there? |
yes please. If you get to repro please file a GH issue with logs. Thanks |
@TheNilesh just released v0.41.0 |
When cluster is still present but marked as deleted, Sveltos can avoid removing resources (helm charts and/or kubernetes resources) from such a cluster.
Anything else created in the management cluster for such managed cluster still needs to be removed.
Fixes #735
Fixes #732