teseraio / ensemble

Modular Kubernetes operator to manage the lifecycle of databases
https://ensembleoss.io
Mozilla Public License 2.0
42 stars 1 forks source link

Remove multiple stopped states #72

Closed ferranbt closed 3 years ago

ferranbt commented 3 years ago

Right now, both Stopped and Failed states represent that the instance is not running. We use different states so that the reconciler knows when to restart an instance (Failed) or not (Stopped due to an update).

It is up to the Provider to figure out which state is the correct when it detects that the instance is down. It would require an internal logic on each Provider to check if upon an instance being stopped the current state is Tainted (=>Stopped) or Running (=>Failed). That logic should be moved to the operator/reconciler and keep only one Stopped state.