operator-framework / operator-framework/java-operator-sdk

Corner Case: Clenup Processing for Delete Event Without Finalizer

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

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

feature
Ngôn ngữ chính
Java
Star
944
Fork
242
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
43

Mô tả

If Cleaner interface is implemented by a reconciler a finalizer is automatically added to the custom resource, and cleaner is called before it gets removed.
There is however a corner case when it makes sense to do cleanup event finalizer is not used. In case there is an in memory data held for a custom resource, so when a custom resource deleted, related indexed or in memory objects needs to be cleaned up. In this case a finalizer is not needed, since if the operator is down and the delete event is missed it's not a problem, since the cleanup is just for in memory data.

To support this we could add a feature flag to @ControllerConfiguration to don't add finalizer for cleanup: addFinalizerForCleaner.

Note that this is not a priority issue, we should probably implement it only if some requests it. Also having a finalizer in those cases would not be a big issues.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu với annotation @ControllerConfiguration và truy vết cách các triển khai Cleaner kích hoạt việc xử lý finalizer trong quá trình xóa custom resource. Xác nhận delete event được xử lý ở đâu và cleanup được gọi như thế nào. Công việc được coi là hoàn tất khi cấu hình được đề xuất kiểm soát việc một cleaner có thêm finalizer hay không mà không thay đổi hành vi cleanup, đồng thời hành vi liên quan được bao phủ bởi các kiểm thử.

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

Đánh giá

Công nghệ
java, kubernetes
Lĩnh vực
infrastructure
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.