Kubernetes reference chart: an operator command can leave an unowned NetworkPolicy when the policy create times out
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- kubernetes, python
- 领域
- devops, infrastructure
调研方向
从 deploy/stack_operator.py 中的 Installation.job() 开始,沿着 NetworkPolicy 创建、Job 创建和 active_job 赋值的顺序进行;然后找到失败时释放 Lease 的路径。查找围绕 job 创建的现有 operator 测试,看看 kubectl 调用是如何被 stub 的,因为你会需要一个 policy 失败的用例。修复方式是:在释放 Lease 之前尝试执行 kubectl delete networkpolicy --ignore-not-found,或者保留 Lease 并报告应检查哪个对象;因此,完成意味着不确定的创建路径不会留下无主的 policy,并且失败会被报告。
由索引模型根据 Issue 内容生成。
描述
Installation.job() in deploy/stack_operator.py creates an operation Job's NetworkPolicy before it sets active_job. If kubectl create for the policy fails with an uncertain outcome, such as a server timeout or a lost connection, the operator releases its Lease. The policy may still exist.
That policy has no owner reference yet, because the owner is set to the Job only after the Job is created, and it has no TTL. So it stays until someone deletes it by hand.
Impact: low. The policy selects only the unique registrystack.org/operation-id label of an operation that never ran, so it affects no other workload. It is clutter, and it is left over after an operator command that did not report it.
Possible fixes:
- On a failed policy create, try once to
kubectl delete networkpolicy <name> --ignore-not-foundbefore releasing the Lease, and report if that delete also fails. - Or treat an uncertain policy create like an uncertain Job create: keep the Lease and tell the operator which object to check.
Found during the review of #2758. It is older than #2758 and was left out of that PR.
- 主要语言
- Rust
- 星标
- 2
- 派生
- 0
- 平均合并
- 9 小时 48 分钟
- 30 天内合并 PR
- 151
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
registrystack/registry-stack 的其他 Issue
-
area:breg enhancement
难度 2/5 1-3 小时 新手友好度 65/100
registrystack/registry-stack#2765 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
registrystack/registry-stack#2743 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
registrystack/registry-stack#2706 ·
维护者通常 1 天内回复
-
macOS contributor gates: Messaging config tests fail under the symlinked macOS temporary directory未关闭
难度 2/5 1-3 小时 新手友好度 83/100
registrystack/registry-stack#2704 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
registrystack/registry-stack#2698 ·
维护者通常 1 天内回复
查看 registrystack/registry-stack 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
AstrBotDevs/AstrBot-desktop#197 ·
-
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 1/5 1 小时以内 新手友好度 82/100
stackabletech/airflow-operator#898 ·
维护者通常 1 天内回复
-
2 advisory ignore entries no longer match anything (`bytes`, `time` already patched in `Cargo.lock`)可能已有人在做 @zyl71 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100