When using finalizers, delete protection via annotation is ignored

Đang mở
#2,918 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go, kubernetes, postgresql
Lĩnh vực
databases, devops

Hướng nghiên cứu

Bắt đầu trong pkg/controller/postgresql.go, tại phần xử lý DeleteTimestamp quanh dòng 334, sau đó lần theo cách EventDelete được đưa vào hàng đợi và nơi kiểm tra cơ chế bảo vệ xóa dựa trên annotation. Xác nhận đường đi của finalizer và luồng sự kiện bằng các bài kiểm thử controller hiện có, nếu có. Hoàn thành khi cơ chế bảo vệ xóa được tuân thủ trước khi tài nguyên bị xóa khi sử dụng finalizer.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

question
  • 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).

Ngôn ngữ chính
Go
Star
5.3k
Fork
1.1k
Merge trung bình
3 ngày 17 giờ
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của zalando/postgres-operator

Tất cả issue của zalando/postgres-operator

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.