operator-framework / operator-framework/java-operator-sdk
Corner Case: Clenup Processing for Delete Event Without Finalizer
Chưa có ai nhận issue này.
- 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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- 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