Kubegres needs to run the following command to fix up primaries after they've been promoted at the Kubernetes level:
NAMESPACE=...
KUBEGRES_NAME=...
KUBEGRES_SECRET_NAME=...
kubectl -n $NAMESPACE exec -it $(kubectl -n $NAMESPACE get pod -l replicationRole=primary,app=$KUBEGRES_NAME -o=name) -- /bin/bash -c "PGPASSWORD=$(kubectl -n $NAMESPACE get secret $KUBEGRES_SECRET_NAME --template '{{.data.superUserPassword}}' | base64 --decode) /bin/psql -U postgres -c 'SELECT pg_promote();'"