e2e: node: split utilities to learn machine properties

A lot ofe2e_node  tests need to re-learn machine HW
properties to check the correctness of the behavior.
Over time, we start using these utilities among different
test groups (e.g. memory manager tests use cpu manager tests
utilites). So let's de-entangle this state by moving
the shared utilities in a separate util file.

Trivial code movement, no intended behavioral changes.

Signed-off-by: Francesco Romani <fromani@redhat.com>
This commit is contained in:
Francesco Romani
2025-08-11 10:22:58 +02:00
parent 1a4e289cfa
commit bb7cff161c
4 changed files with 160 additions and 96 deletions

View File

@@ -22,15 +22,9 @@ package e2enode
import (
"fmt"
libcontainercgroups "github.com/opencontainers/cgroups"
"k8s.io/kubernetes/test/e2e_node/criproxy"
)
// IsCgroup2UnifiedMode returns whether we are running in cgroup v2 unified mode.
func IsCgroup2UnifiedMode() bool {
return libcontainercgroups.IsCgroup2UnifiedMode()
}
// addCRIProxyInjector registers an injector function for the CRIProxy.
func addCRIProxyInjector(proxy *criproxy.RemoteRuntime, injector func(apiName string) error) error {
if proxy == nil {