e2e: suppress or ignore init log output

klog calls during init are becoming a problem because now test/e2e/framework
depends in test/utils/ktesting which bumps up the default verbosity during init
to make test output more complete when there is no argument parsing.

For cadvisor, an upstream fix is
needed (https://github.com/google/cadvisor/pull/3778). For kubectl we can make
it silently accept the valid (!) LC_ALL=C.

Kubernetes-commit: d17aaf5e29f209ca71047078650e9dcd266e47a4
This commit is contained in:
Patrick Ohly 2025-12-10 16:00:33 +01:00 committed by Kubernetes Publisher
parent 515fd34812
commit 0b6b58f68a

View file

@ -121,7 +121,9 @@ func loadSystemLanguage() string {
}
pieces := strings.Split(langStr, ".")
if len(pieces) != 2 {
klog.V(3).Infof("Unexpected system language (%s), defaulting to en_US", langStr)
if langStr != "C" {
klog.V(3).Infof("Unexpected system language (%s), defaulting to en_US", langStr)
}
return "default"
}
return pieces[0]