-
Notifications
You must be signed in to change notification settings - Fork 64
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
Blue-green deployment causes leaking PVs #933
Comments
Hi @ruifung because PVC stores some data, I think it is very dangerous for Operator to delete it. I hope to keep PVC for data recovery in certain situations. Maybe I can provide a |
Honestly, I'd personally have preferred to just have the previous behaviour where it would just patch the STS and let the STS do a rolling update. But I suppose having a revisionHistoryLimit that will clean up the STS, and I think probably a separate option that enables PVC cleanup for the STS. So the STS cleanup can be enabled without enabling PVC cleanup if desired. This would certainly limit the amount of STS/PVCs that are left behind. |
Very reasonable, let me think about how to achieve it. This may be implemented in version 2.3 and the new APIVersion.
I think STS and PVC should maintain a corresponding relationship in order to perform rollback operations in certain situations. If there is only STS without PVC, or only PVC without STS, then the rollback operation would be meaningless. |
Hi @ruifung After discussing with colleagues, we believe it is reasonable not to retain the original rolling update of sts:
Due to the above reasons, we did not retain the rolling update of sts. Maybe revisionHistoryLimit can meet your needs? For example, set revisionHistoryLimit = 1? |
Perhaps it will. I suppose I could always fall back to using a helm deployment instead if it does not? Also, will this leave behind "offline" nodes in emqx or will that clean up offline nodes from the cluster state eventually? |
Yes, it will leave a stop node in EMQX cluster status, because the default value of the |
EMQX Operator 2.2.2 has been released, I will close this issue |
Is your feature request related to a problem? Please describe.
With the introduction of the new blue-green deployment method, every change that impacts the manifests results in a new StatefulSet being generated. While this in itself isn't a problem. What could be a problem is the fact that each statefulset created and deleted will leave behind N PVCs and their associated PV.
This could cause unwanted costs and/or resource wastage where PVs are backed by persistent disks or similar mechanisms due to leaking PVs until manually cleaned up.
Describe the solution you'd like
Some way to automatically clean up the PVCs left behind due to blue-green deployment after deletion of the old statefulset.
Describe alternatives you've considered
An option to disable blue-green deployment and revert to using StatefulSet RollingUpdate behavior.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: