When the operator is stopped, deleting the PostgreSQL CR, and then restarting the operator, the related resources (such as sts, service, ep, etc.) are not deleted. #2678
Please, answer some short questions which should help us to understand your problem / question better?
Which image of the operator are you using?
v1.12.1(built by myself)
Where do you run it - cloud or metal? Kubernetes or OpenShift?
kind k8s
Are you running Postgres Operator in production?
no
Type of issue?
BUG?
operator log:
INFO[0004] listening on :8080 pkg=apiserver
INFO[0004] ADD event has been queued cluster-name=default/acid-minimal-cluster-7 pkg=controller worker=0
INFO[0004] syncing of the cluster started cluster-name=default/acid-minimal-cluster-7 pkg=controller worker=0
INFO[0004] cluster has a DeletionTimestamp of 2024-06-28T11:55:28+08:00, starting deletion now. cluster-name=default/acid-minimal-cluster-7 pkg=controller worker=0
DEBU[0004] new node has been added: /openpie-control-plane (kind://docker/openpie/openpie-control-plane) pkg=controller
DEBU[0004] new node has been added: /openpie-worker (kind://docker/openpie/openpie-worker) pkg=controller
DEBU[0004] new node has been added: /openpie-worker2 (kind://docker/openpie/openpie-worker2) pkg=controller
DEBU[0004] new node has been added: /openpie-worker3 (kind://docker/openpie/openpie-worker3) pkg=controller
INFO[0004] removing the logical backup job cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] logical backup cron job "logical-backup-acid-minimal-cluster-7" has already been deleted cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] deleting statefulset cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] there is no statefulset in the cluster cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] deleting pod disruption budget cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] there is no pod disruption budget in the cluster cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] deleting endpoint cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] there is no master endpoint in the cluster cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] deleting service master cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] No service for master role was found, nothing to delete cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] deleting endpoint cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] there is no replica endpoint in the cluster cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] deleting service replica cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] No service for replica role was found, nothing to delete cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] removing leftover Patroni objects (endpoints / services and configmaps) cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] deleting service "default/acid-minimal-cluster-7-config" cluster-name=default/acid-minimal-cluster-7 pkg=cluster
INFO[0004] deleting connection pooler spilo-role=master cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] no connection pooler to delete cluster-name=default/acid-minimal-cluster-7 pkg=cluster
INFO[0004] deleting connection pooler spilo-role=replica cluster-name=default/acid-minimal-cluster-7 pkg=cluster
DEBU[0004] no connection pooler to delete cluster-name=default/acid-minimal-cluster-7 pkg=cluster
INFO[0004] removing finalizer postgres-operator.acid.zalan.do cluster-name=default/acid-minimal-cluster-7 pkg=cluster
INFO[0004] DELETE event has been queued cluster-name=default/acid-minimal-cluster-7 pkg=controller worker=0
INFO[0004] received add event for already existing Postgres cluster cluster-name=default/acid-minimal-cluster-7 pkg=controller worker=0
INFO[0004] cluster has been deleted cluster-name=default/acid-minimal-cluster-7 pkg=controlle
It is possible that the statefulset data is not synchronized when the operator process is up, as indicated by the message "there is no statefulset in the cluster".
Please, answer some short questions which should help us to understand your problem / question better?
operator log:
It is possible that the statefulset data is not synchronized when the operator process is up, as indicated by the message "there is no statefulset in the cluster".