Revert "Switch hard error to a WARNING for kernel version check"

This reverts commit fd06dcd604.

The revert is not to make it a hard error again, this revert is needed
to revert cleanly the commit that added this as an error in the first
place.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
This commit is contained in:
Rodrigo Campos 2025-02-18 17:10:56 +01:00
parent 88e9d8fe6a
commit c88aef2d63

View File

@ -138,8 +138,9 @@ func (kl *Kubelet) getKubeletMappings() (uint32, uint32, error) {
features.UserNamespacesSupport, err)
}
if kernelVersion != nil && !kernelVersion.AtLeast(version.MustParseGeneric(utilkernel.UserNamespacesSupportKernelVersion)) {
klog.InfoS("WARNING: the kernel version is incompatible with the feature gate, which needs as a minimum kernel version",
"kernelVersion", kernelVersion, "feature", features.UserNamespacesSupport, "minKernelVersion", utilkernel.UserNamespacesSupportKernelVersion)
return 0, 0, fmt.Errorf(
"the kernel version (%s) is incompatible with the %s feature gate, which needs %s as a minimum kernel version",
kernelVersion, features.UserNamespacesSupport, utilkernel.UserNamespacesSupportKernelVersion)
}
}