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

Automatically Delete Resource if Dependent Removed From Workflow

Đang mở
#2,267 0 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 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:

  1. 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.

  2. 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 getSecondaryResource on 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

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 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

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.