Skip to content

When using finalizers, delete protection via annotation is ignored #2918

Open
@mortenlj

Description

@mortenlj
  • Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.13.0
    ghcr.io/zalando/postgres-operator:v1.14.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s]
    GCP
  • Are you running Postgres Operator in production? [yes | no]
    Not yet
  • Type of issue? [Bug report, question, feature request, etc.]
    Bug report

When using finalizers, the operator deletes all resources before the EventDelete event is received.
The delete protection check occurs when the EventDelete event is added to the queue, but by then all the resources have been deleted.

When the operator notices the DeleteTimestamp is set here, it proceeds to delete the cluster right away.
It might be better at that point to simply queue an EventDelete event to handle the deletion the normal way (assuming I've understood the internal event system correctly).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions