Files
Davanum Srinivas 9c3903ca47 Move OOM watching out of the lib module into the binary
The lib module is the subset of cAdvisor that the kubelet vendors, and the
kubelet does not need cAdvisor to watch for OOMs. It reads /dev/kmsg itself
and supplies container_oom_events_total on its own, so the OOM machinery does
not belong in lib.

Remove watchForNewOoms and the per-container OOM counter from lib/manager, and
move the kmsg reader (utils/oomparser) from lib to the root module, which the
binary depends on. lib no longer imports github.com/euank/go-kmsg-parser.

The cAdvisor binary keeps its OOM events and the container_oom_events_total
metric. cmd/internal/api now runs the OOM watcher, feeds OOM and OOM-kill
events to the event manager, and wraps the manager so the prometheus collector
reports the per-container OOM count.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-06-26 11:52:16 -04:00
..