You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please, answer some short questions which should help us to understand your problem / question better?
Which image of the operator are you using? ghcr.io/zalando/postgres-operator:v1.13.0
Where do you run it - cloud or metal? Kubernetes or OpenShift? OpenShift 4.15
Are you running Postgres Operator in production? yes
Type of issue? Bug report
I've tried creating a postgresql resource with an ownerReference set to another resource. This resulted in a failure to create the postgres instance with the following error message:
time="2024-09-27T12:00:14Z" level=info msg="creating a new Postgres cluster" cluster-name=my-namespace/my-postgres pkg=controller worker=5
time="2024-09-27T12:00:14Z" level=warning msg="cluster created failed: could not create master service: services \"my-postgres\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>" cluster-name=my-namespace/my-postgres pkg=cluster worker=5
When I don't set an ownerReference on the postgresql resource the cluster creates without issue. Looking at a successfully created cluster I cannot see any ownerReferences set on the svc/my-postgres. The new owner references feature is not enabled in our environment.
The text was updated successfully, but these errors were encountered:
Looking at https://github.com/zalando/postgres-operator/blob/master/pkg/cluster/k8sres.go#L2524 I understand why the error is happening: the operator tries to "forward" the ownerReference set on the CR, but I don't understand why it is doing that at all. The comment for the function also talks about the dependency on the CRD or StatefulSEt, but I assume it means the CR?
Please, answer some short questions which should help us to understand your problem / question better?
I've tried creating a postgresql resource with an ownerReference set to another resource. This resulted in a failure to create the postgres instance with the following error message:
When I don't set an ownerReference on the postgresql resource the cluster creates without issue. Looking at a successfully created cluster I cannot see any ownerReferences set on the
svc/my-postgres
. The new owner references feature is not enabled in our environment.The text was updated successfully, but these errors were encountered: