reactive-tech / kubegres

Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.
https://www.kubegres.io
Apache License 2.0
1.32k stars 74 forks source link

Re-check Primary-Failover / Disabling Fail-Over-Management #177

Open clauspruefer opened 7 months ago

clauspruefer commented 7 months ago

"It manages fail-over: if a Primary PostgreSql crashes, it automatically promotes a Replica PostgreSql as a Primary."

  1. How is this feature tested? Is it rock solid?
  2. Is it possible to disable this feature?

Due to the fact that kubernetes network is virtualized, it should work 100%, in bare-metal scenarios switch / hardware outages can lead to split-brain scenario. This should be re-verified on kubernetes.

alex-arica commented 7 months ago

Yes it is possible to disable it. More details in the doc here: https://www.kubegres.io/doc/properties-explained.html#spec_failover

It was rock tested however, as you pointed out Kubernetes network can be unstable on some cloud provider leading to Kubernetes reporting that an instance of Postgres is not healthy. When this happens, Kubegres might trigger a failover. But the failover itself was rock tested.