Fix patroni readiness probe
The currently configured readiness probe for Patroni container is using the /health endpoint of Patroni REST API to assure Postgres is up and running before declaring the Pod as Ready:
GET /health: returns HTTP status code 200 only when PostgreSQL is up and running.
The problem is that if any initialization is configured for such cluster the Pod could become Ready before the initialization completes. To avoid such situation the /read-only endpoint of Patroni REST API could be used to make sure the initialization has completed too and the node is Ready to be exposed:
GET /replica: replica health check endpoint. It returns HTTP status code 200 only when the Patroni node is in the state running, the role is replica and noloadbalance tag is not set. GET /read-only: like the above endpoint, but also includes the primary.