operator-framework / operator-framework/java-operator-sdk
Automatically Delete Resource if Dependent Removed From Workflow
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 a dependent is removed from a workflow, the previously created resource represented by that dependent needs to be cleaned up. This can happen before the actual workflow is executed.
This could be done automatically before a workflow is executed, although it is not trivial in general. There are two problems:
-
If a dependent is removed, on startup the informer related to its type might not be added anymore. So we would need to mark somewhere (maybe status or annotation?) the GVk-s of resources managed.
-
If there are multiple resources of the same type in general it is not easy to identify which resource belongs to which dependent resource - without calling
getSecondaryResourceon the dependent. Since this cleanup would happen before the dependents are reconciled this is not doable without imposing additional requirements on implementation: for example, if the id of the resource is calculated based on the desired state, the desired state calculation might depend on other resources (which might not be reconciled now).
Fortunately, this problem can be solved simply just by adding the name of the dependent as an annotation to the resource so it can be identified easily.
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 bằng cách xem xét việc thực thi workflow cũng như vòng đời của informer và tài nguyên phụ thuộc được mô tả trong issue. Xác định cách giữ lại các kind của tài nguyên được quản lý và tên của các tài nguyên phụ thuộc, sau đó định nghĩa việc hoàn tất sao cho quá trình dọn dẹp xảy ra trước khi thực thi đối với các tài nguyên phụ thuộc đã bị xóa, mà không nhầm lẫn giữa nhiều tài nguyên cùng loại.
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100