Optimize resource discovery/collection
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- go, kubernetes
- 领域
- cli, infrastructure
调研方向
首先跟踪规则集加载和资源发现路径,然后检查已发现对象的获取方式以及它们如何保存在内存中。使用已加载的内置规则和自定义规则来识别所需的资源类型,跳过无关资源,并对剩余的发现结果进行分页。完成的标准是:大型集群不再需要收集无关资源,并且现有的弃用检查仍能正常工作。
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
Pluto currently appears to pull all API resource types from a cluster, followed by all objects matching those types, in an unpaginated list. In a large cluster with a significant number of resources, many of them unrelated to the rules/deprecations being checked, this leads to high memory usage.
Describe the solution you'd like
Short version: only pull the resources that appear in the ruleset we loaded, so we don't use as much memory.
Long version / suggestion:
- After loading the ruleset (built-in deprecations and custom/user-defined), build a list of resource types we need to check
- Only pull the resources that actually need to be checked (this can avoid loading thousands of events, for example)
- Paginate discovery of the remaining resource types, discarding ones we don't need before fetching the next set
Describe alternatives you've considered
- Smaller clusters with fewer resources: it's currently not feasible for me to reduce the number of resources in my cluster.
- Give pluto more resources: I've more than tripled the resources I gave to pluto to run against a cluster, I can technically keep going but improving the collection logic is more efficient
Additional context
N/A
- 主要语言
- Go
- 星标
- 2.6k
- 派生
- 142
- 平均合并
- 1 小时 21 分钟
- 30 天内合并 PR
- 2
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FairwindsOps/pluto 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 45/100
FairwindsOps/pluto#608 ·
-
enhancement pinned priority: could
难度 5/5 一周以上 新手友好度 35/100
FairwindsOps/pluto#421 · 2 条评论 · 2 个 reaction ·
-
Exclude some resource kind可能已有人在做 @Kunalbehbud 于 89 天前认领。 未关闭enhancement pinned
难度 3/5 1-2 天 新手友好度 42/100
FairwindsOps/pluto#399 · 2 条评论 · 1 个 reaction ·
-
enhancement pinned priority: could
难度 5/5 一周以上 新手友好度 30/100
FairwindsOps/pluto#215 · 4 条评论 · 1 个 reaction ·
-
enhancement help wanted pinned priority: could
难度 5/5 一周以上 新手友好度 30/100
FairwindsOps/pluto#137 · 2 条评论 · 2 个 reaction ·
查看 FairwindsOps/pluto 的全部 Issue
相似的 Issue
-
component/gpu-kubelet-plugin component/helm needs-triage
难度 2/5 1-3 小时 新手友好度 62/100
kubernetes-sigs/dra-driver-nvidia-gpu#1559 ·
维护者通常 1 天内回复
-
TOTP enrollment returns 500 for phone-only users (empty TOTP account name)可能已有人在做 @emiliosandoval4 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
8.9 to 8.10 Helm upgrade guide still says deprecated keys are removed in chart v16 (Camunda 8.11)未关闭
难度 1/5 1 小时以内 新手友好度 78/100
camunda/camunda-platform-helm#7559 ·
维护者通常 1 天内回复
-
docs: namespaceRegexes example teaches prefix matching, but regexes are matched as a substring可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭triage/pending-triage
难度 2/5 1-3 小时 新手友好度 74/100
external-secrets/external-secrets#7117 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
ENTERPILOT/GoModel#1183 · 1 条评论 ·
维护者通常 1 天内回复