operator-framework / operator-framework/java-operator-sdk
Simple core and layered reconciler implementation for v6
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ả
TL;DR We could make the core of the framework simpler by introducing a more layered architecture. While keeping the migration for the users trivial.
Problem definition
Currently the core of a framework has baked logic to work with higher level logic like:
- Adding finalizers by implementing
Cleanerinterface - Managed workflows inside the controller
- Automatic generation filtering
- Catching error and error handling, thus
updateErrorStatusmethod.
We recently added a generic mode Trigger reconciliation on all events
While it makes a nice API for the users, an maybe even nice out of the box experience, makes the core of the framework more complex - and even for users I assume hard to follow, if some wants to read the code.
What we could do in next major version is to layer those functionalities:
- The core will just work on top of a simplified
Reconcilerinterface. What will handle basically be the all event mode. So we won't support finalizers,UpdateControl.patch methods,and most of the functionality ofReconciliationDispatcherwould be moved to an abstract Reconciler implementation:GenericReconciler. - Retry, Rate limiting would stay as it is now
- The managed workflow handling would an additional extension of
GenericReconciler:WorkflowReconciler. That will handle the managed workflow discovery, their configuration etc.
Migration
Note that migration for the users could be kept trivial, basically just extending the GenericReconciler / WorkflowReconciler (Where we could support the UpdateControl etc as is now) instead of implementing Reconciler.
Pros
- The core would be much simpler
- The logic around these extended reconcilers much easier to be followed by the users (from source code)
Cons
- This does not provide direct value for users, other than easier to handle
Notes
- before we make a decision, we should explore this first in a proptotype
- TODO: proper design description
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
Đọc các trách nhiệm hiện tại của Reconciler và ReconciliationDispatcher, bao gồm updateErrorStatus, sau đó tạo nguyên mẫu cho các lớp GenericReconciler và WorkflowReconciler được đề xuất. Công việc được xem là hoàn tất khi có một nguyên mẫu hoạt động và một mô tả thiết kế phù hợp giải thích sự phân tách cốt lõi, đồng thời giữ cho việc migration đối với người dùng hiện tại trở nên đơn giản.
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
- backend-api-design
- Loại issue
- Tái cấu trúc
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100