kubernetes-sigs / kubernetes-sigs/node-feature-discovery
topology-updater: derive pod accounting from the kubelet PodResources API (retire the pod-spec informer)
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 317
- Avg merge
- 21h 39m
- Merged PRs (30d)
- 5
Description
Follow-up to #2509.
#2509 replaces topology-updater's per-pod apiserver GET with a node-scoped Pod informer. @ffromani noted in review that the decisions `isWatchable` makes can largely come from the kubelet PodResources `List` response we already fetch — non-empty `container.CpuIds` (exclusive CPUs), `container.GetDevices()` (devices), `container.GetMemory()` (NUMA memory) — instead of the pod spec. RTE took this approach in its resourcemonitor rewrite (k8stopologyawareschedwg/resource-topology-exporter@d0d4523b).
**Benefits:** removes the pod informer introduced in #2509, its `pods` list/watch RBAC, and the cache-sync startup dependency.
**One caveat:** the List footprint isn't a 1:1 substitute for the live Guaranteed-QoS check. A Guaranteed pod with non-integral CPU and no devices is "watchable" by the spec but has an empty List footprint, so a naive port would skip it — though it emits no NodeResourceTopology resources today either way (gated out in `Scan()`). The rewrite should confirm that equivalence with tests. (`cpu_ids` is exclusive-only under the static CPU-manager policy — the documented `List` semantics; `none` policy yields empty `cpu_ids`, matching current behavior.)
**Done when:**
- [ ] watchable/exclusive-CPU decision derived from PodResources `List`
- [ ] pod informer + its `pods` list/watch RBAC removed
- [ ] e2e coverage incl. the Guaranteed/non-integral/no-device case
#2509 is the incremental predecessor and should merge first. This is a larger change to the accounting path and needs its own e2e-coverage review.
/kind feature
/cc @ffromani @alaypatel07
Contributor guide
Research direction
Start with topology-updater's isWatchable and Scan paths, then trace the existing kubelet PodResources List handling and the pod informer with its pods list/watch RBAC from #2509. Add or update e2e coverage for the Guaranteed, non-integral-CPU, no-device case. Done means accounting comes from List, the informer and RBAC are removed, and the documented equivalence is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 46/100