GVK resolution fails if metrics-server is unavailable
还没有人认领这个 Issue。
评估
调研方向
使用 kubectl -n kube-system delete pods -l k8s-app=metrics-server && stackablectl release install dev 重现失败,然后检查 src/client/builder.rs:199 中的 GVK discovery 以及 src/client/mod.rs:467 附近的错误处理。修复应当在 metrics-server 不可用时允许 release 安装继续,同时保留对 stackablectl 所需 API 组的解析。
由索引模型根据 Issue 内容生成。
描述
Affected version
stackablectl 24.7.1
Current and expected behavior
- Run
kubectl -n kube-system delete pods -l k8s-app=metrics-server && stackablectl release install dev - Observe that
stackablectlcrashes with the following error message:
ERROR failed with status 503 Service Unavailable
at src/client/builder.rs:199
WARN Unsuccessful data error parse: service unavailable
at src/client/mod.rs:467
An unrecoverable error occured: failed to execute release (sub)command
Caused by these errors (recent errors listed first):
1: failed to create Kubernetes client
2: failed to run GVK discovery
3: ApiError: "service unavailable\n": Failed to parse error data (ErrorResponse { status: "503 Service Unavailable", message: "\"service unavailable\\n\"", reason: "Failed to parse error data", code: 503 })
4: "service unavailable\n": Failed to parse error data
- Observe that
kubectlandk9sare able to manage the cluster just fine
I suspect that this comes down to metrics-server using K8s API aggregation, which allows it to provide a fake "resource" that is stored by itself rather than in etcd. This also means that that resource can be unavailable even if the apiserver and etcd are both doing fine.
Possible solution
We could either:
- Limit GVK resolution to the apigroups we care about
- Defer apigroup-specific resolution errors until accessing the relevant apigroup
Additional context
No response
Environment
Using k3s v1.31.0+k3s1 via k3d
Would you like to work on fixing this bug?
None
- 主要语言
- Rust
- 星标
- 10
- 派生
- 5
- 平均合并
- 4 小时 41 分钟
- 30 天内合并 PR
- 4
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stackabletech/stackablectl 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
stackabletech/stackablectl#456 ·
-
RUSTSEC-2026-0221: `event-listener` allows `!Send` tags to cross thread boundaries via `StackSlot` 未关闭
难度 3/5 1-2 天 新手友好度 35/100
stackabletech/stackablectl#452 ·
-
难度 4/5 3-5 天 新手友好度 45/100
stackabletech/stackablectl#444 ·
-
难度 5/5 一周以上 新手友好度 35/100
stackabletech/stackablectl#419 ·
-
难度 4/5 3-5 天 新手友好度 35/100
stackabletech/stackablectl#413 ·
查看 stackabletech/stackablectl 的全部 Issue
相似的 Issue
-
todo:perf
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 88/100
-
ACP agents get no MCP servers when the thread is created before the project's first worktree loads 未关闭state:needs triage
难度 2/5 1-3 小时 新手友好度 88/100
zed-industries/zed#64611 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
ontola/atomic-server#1625 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
objectionary/phie#154 ·