Reconciler with enabled "generationAwareEventProcessing" reconciles unchanged custom resource upon startup
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- java, kubernetes
- Lĩnh vực
- backend, infrastructure
Hướng nghiên cứu
Không có tệp nguồn hoặc test nào được nêu tên. Hãy bắt đầu bằng cách tái hiện quá trình khởi động operator với generationAwareEventProcessing được bật và một custom resource hiện có, trong đó metadata.generation bằng status.observedGeneration; theo dõi quá trình reconciliation khi khởi động và cách xử lý informer-cache. Hoàn tất khi các resource không thay đổi không được reconcile khi khởi động và có regression test bao quát trường hợp này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Report
What did you do?
Hello,
We've encountered the behavior where we're using the default Reconciler settings, which has generationAwareEventProcessing turned on as well as a default maxReconciliationInterval set to 10 hours. Our CR implements the ObservedGenerationAwareStatus interface, so it has the observedGeneration property present in the status and it's handled by the framework.
We're seeing that upon Operator startup a reconciliation is triggered, when there is an already created custom resource in the cluster which has been reconciled already and has metadata.generation equal to status.observedGenertion.
The problem in this scenario is that the Operator is being updated and has updated logic, triggered by a pipeline automation script update. An update to the CR is going to follow in the next pipeline step. However, the triggered reconciliation captures the current CR in the cluster before the updated one can be applied. That in some cases leads to breaking dependent resources spec and subsequent failure (e.g. old incompatible images read from the CR set to an updated Deployment dependent resources spec encoded in the Operator code).
What did you expect to see?
No reconciliation triggered on the CR, which has it's generation and observed generation matching properties.
Environment
Kubernetes cluster type:
Gardener K8s 1.33.5
java-operator-sdk version is 4.4.4
Java version 17
Possible Solution
Not sure if the behavior could be caused by the maxReconciliationInterval being not set after the update or just informer caches being empty.
- Ngôn ngữ chính
- Java
- Star
- 944
- Fork
- 242
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 46
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.
Issue khác của operator-framework/java-operator-sdk
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
operator-framework/java-operator-sdk#3621 · 7 bình luận · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
operator-framework/java-operator-sdk#3615 · 1 bình luận · 3 reaction ·
-
Set baseline Java version to 21 Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
operator-framework/java-operator-sdk#3568 · 1 bình luận · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Support for Virtual Threads Đang mở
operator-framework/java-operator-sdk#3538 · 2 bình luận · 2 người được giao ·
Tất cả issue của operator-framework/java-operator-sdk
Issue tương tự
-
certification
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Đang mởbug ecr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Needs: Triage Type: Feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
github/copilot-sdk#2760 ·