mirror of
https://github.com/google/cadvisor.git
synced 2026-10-28 16:44:49 +08:00
The collapsed model used value types for the per-subsystem stats (Cpu, Memory, Network, DiskIo, Processes), which cannot express "not collected" versus "collected and zero". Restore pointer fields so a nil signals the subsystem was not collected, matching the info/v2 shape the kubelet relies on. Handlers allocate each pointer when they collect the subsystem; the metrics collector and the v1/v2 REST converters nil-guard their reads. Signed-off-by: Davanum Srinivas <davanum@gmail.com>