zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.35k stars 980 forks source link

Label spilo-role=replica appears in 20-40 second after the cluster is Ready #1557

Open telepenin opened 3 years ago

telepenin commented 3 years ago

Seems the replica is unavailable first time when the cluster is Ready after increasing replicas.

How to reproduce:

operator log - https://pastebin.com/aqu4b9M9

Which image of the operator are you using? Using the latest master's configuration Where do you run it: cloud/kvm - minikube, cloud/kvm - k3s Are you running Postgres Operator in production? no, but faced it on the k3s deploy Type of issue? Bug report

FxKu commented 3 years ago

This is expected behaviour. First Postgres starts up, then it receives the label from Patroni. There have been questions before on K8s probes but so far we either have (readiness) or want (liveness) them.