Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature]: Operator readiness probe should reflect informer cache sync, not healthz.Ping

未关闭 适合新手
#3,074 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
go, kubernetes
领域
devops

调研方向

从 cmd/gpu-operator/main.go 第 255 行开始,那里注册了 mgr.AddReadyzCheck("check", healthz.Ping),并查看附近其他 manager 选项(mgr.GetCache()、healthz.Checker)的用法。在 controller-runtime 的 healthz 包中确认 Checker 的签名,然后将 readyz 检查替换为一个闭包:在 mgr.GetCache().WaitForCacheSync 返回 true 之前一直报告失败,同时保持 liveness 使用 healthz.Ping。完成的标准是:新启动的副本在其 informer 缓存同步完成之前保持 NotReady,而 /healthz 仍然通过。通过构建二进制文件进行验证,如果可行,还要在滚动更新期间观察 Pod 状态。

由索引模型根据 Issue 内容生成。

描述

feature lifecycle/frozen needs-triage

Motivation
cmd/gpu-operator/main.go:255 registers mgr.AddReadyzCheck("check", healthz.Ping), so the operator pod reports Ready as soon as the HTTP server starts, before its informer caches have synced. Rollouts, PodDisruptionBudgets and monitoring treat a new operator replica as serving while it cannot yet reconcile.

Proposal
Register a readiness checker that fails until the manager's cache has synced, e.g. a closure calling mgr.GetCache().WaitForCacheSync with a short timeout, and keep healthz.Ping for liveness only.

主要语言
Go
星标
2.9k
派生
569
平均合并
1 天 5 小时
30 天内合并 PR
90

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/gpu-operator 的其他 Issue

查看 NVIDIA/gpu-operator 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。