zalando / zalando/postgres-operator
Delete of postgres resource is ignored when finalizer is used
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.15.0
- Where do you run it - cloud or metal? Kubernetes or OpenShift? Bare Metal K8s
- Are you running Postgres Operator in production? yes
- Type of issue? Bug Report
It seems that the operator ignores changes to the DeletionTimestamp, only Spec and Annotations are compared, for Deletions DeletionTimestamp is set though, and Delete is never called, because it's actually not yet deleted:
https://github.com/zalando/postgres-operator/blob/master/pkg/controller/postgresql.go#L538
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at pkg/controller/postgresql.go around line 538, where changes are compared and deletion handling is described. Trace how DeletionTimestamp and finalizers affect reconciliation, then verify that a PostgreSQL resource deletion is processed and Delete is called instead of being ignored. Done means deletion works when a finalizer is present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100