Add memory.events metrics to container metrics test

Verify container_memory_events_high_total and
container_memory_events_max_total are reported by cadvisor.
These counters were added in cadvisor v0.57.0 to expose
cgroup v2 memory.events for MemoryQoS observability.

KEP: https://github.com/kubernetes/enhancements/issues/2570
Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
This commit is contained in:
Sohan Kunkerkar 2026-05-20 00:38:40 -04:00
parent 621e250502
commit f1cd17ea97

View file

@ -65,6 +65,8 @@ var _ = SIGDescribe("ContainerMetrics", "[LinuxOnly]", framework.WithNodeConform
"container_fs_writes_total": boundedSample(0, 200),
"container_last_seen": boundedSample(time.Now().Add(-maxStatsAge).Unix(), time.Now().Add(2*time.Minute).Unix()),
"container_memory_cache": boundedSample(0, 10*e2evolume.Mb),
"container_memory_events_high_total": boundedSample(0, 100),
"container_memory_events_max_total": boundedSample(0, 100),
"container_memory_failcnt": preciseSample(0),
"container_memory_failures_total": boundedSample(0, 1000000),
"container_memory_mapped_file": boundedSample(0, 10000000),