Merge pull request #130122 from marosset/windows-unit-test-pkg-kubelet-apis-config-validation-fixes

unit tests - fixing k8s.io/kubernetes/pkg/kubelet/apis/config/validation unit test failures on Windows
This commit is contained in:
Kubernetes Prow Robot 2025-03-04 12:25:51 -08:00 committed by GitHub
commit 6c445ca18a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,6 +17,7 @@ limitations under the License.
package validation_test
import (
goruntime "runtime"
"strings"
"testing"
"time"
@ -81,7 +82,12 @@ var (
ContainerLogMaxWorkers: 1,
ContainerLogMaxFiles: 5,
ContainerLogMonitorInterval: metav1.Duration{Duration: 10 * time.Second},
SingleProcessOOMKill: ptr.To(!kubeletutil.IsCgroup2UnifiedMode()),
SingleProcessOOMKill: func() *bool {
if goruntime.GOOS == "linux" {
return ptr.To(!kubeletutil.IsCgroup2UnifiedMode())
}
return nil
}(),
CrashLoopBackOff: kubeletconfig.CrashLoopBackOffConfig{
MaxContainerRestartPeriod: &metav1.Duration{Duration: 3 * time.Second},
},