Reconciler with enabled "generationAwareEventProcessing" reconciles unchanged custom resource upon startup
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- java, kubernetes
调研方向
未指定源文件或测试。首先使用启用 generationAwareEventProcessing 的 operator,以及一个 metadata.generation 等于 status.observedGeneration 的现有自定义资源,复现 operator 启动;跟踪启动时的 reconciliation 和 informer-cache 处理。完成标准是:未发生变化的资源在启动时不会被 reconcile,并且有一个回归测试覆盖此情况。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Java
- 星标
- 944
- 派生
- 242
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 43
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
operator-framework/java-operator-sdk 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 55/100
operator-framework/java-operator-sdk#3621 · 5 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
operator-framework/java-operator-sdk#3617 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 38/100
operator-framework/java-operator-sdk#3615 · 1 条评论 · 3 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 45/100
operator-framework/java-operator-sdk#3568 · 1 条评论 · 1 个 reaction ·
查看 operator-framework/java-operator-sdk 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-java#6138 · 1 条评论 ·
-
bug needs triage p2
难度 2/5 1-3 小时 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 条评论 ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
apache/rocketmq-dashboard#4654 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100