bluek8s / kubedirector

Kubernetes Director (aka KubeDirector) for deploying and managing stateful applications on Kubernetes
Apache License 2.0
401 stars 91 forks source link

support "pause" of kdcluster #616

Open joel-bluedata opened 2 years ago

joel-bluedata commented 2 years ago

We should support a boolean "switch" in the kdcluster spec that can be used to pause/stop the kdcluster. The effect of stopping would be:

And the effect of restarting would be:

While stopped, some things to consider:

Of course if none of the roles in a kdcluster use PVCs, this feature isn't terribly useful ... you could just delete the kdcluster and then re-create it later. But there's no reason we should particularly try to block using this feature on such kdclusters.

joel-bluedata commented 2 years ago

Other considerations:

joel-bluedata commented 2 years ago

I think we can actually lift a lot of the ideas/decisions from the live-upgrade feature to answer those questions. I.e., only allow pause for a stable configured kdcluster and don't allow other changes while paused; let kdapps declare if they are pausable, but for old kdapps (that haven't declared this) they should be able to be edited to "pausable=true" even if in use.

Not sure about the lifecycle event but I'm inclined to not have that for now.

joel-bluedata commented 2 years ago

Going to see if I can look at this for a near-term release like 0.11.0.