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

Graceful shutdown for controller's namespace deletion

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

@csviri đang làm issue này rồi.

Từ ngày 29/8/2024.

  • #2528 của @csviri — đã merge
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ả

Is your feature request related to a problem? Please describe.

This situation is a typical problem in integration tests (but not just). If the controller manages resources with finalizers in its namespace and the namespace gets deleted, in this case, the namespace deletion can get stuck since the pods of the operator are deleted before it can adequately finalize the resource (thus remove the finalizers).

Describe the solution you'd like

The ideal situation would be, that it waits until all the custom resources in the same namespace are cleaned up. (It might be also be possible to have such an intelligent shutdown hook).

Alternative would be just a simple shutdown hook to add that waits some time before it stops the controller. This might be trivial to add, does not require coding, but would be good to do add an integration test.

Additional context
see also: https://github.com/operator-framework/java-operator-sdk/issues/1876 - The finalizers would be needed if the operator has namespace scoped roles and rolebindings.

Notes:

For leader election, we might actually halt() instead of exit, which bypasses the shutdown hooks.

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.

Đánh giá

Issue này chưa được đánh giá.

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.