kubeblocks
kubeblocks copied to clipboard
[Imporve] The current use of K8s ConfigMap as lease judgement in Lorry may lead to availability defects.
Consider the following scenarios:
-
In a single-master Kubernetes cluster: After the apiserver master node exits, Lorry's lease judgment becomes entirely unavailable.
-
In a three-master Kubernetes cluster: After the apiserver master node exits, testing reveals that Lorry's lease judgment might result in errors, causing the high-availability PostgreSQL cluster to re-elect a new primary.
code ref:
https://github.com/apecloud/kubeblocks/blob/2d82e5a62bdef0338764e31fa9740806ca0b8781/pkg/lorry/dcs/k8s.go#L299