mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-30 17:58:14 +00:00 
			
		
		
		
	Merge pull request #130243 from rata/revert-userns-kernel-check
Revert userns kernel check
This commit is contained in:
		| @@ -41,7 +41,6 @@ import ( | ||||
| 	"k8s.io/apimachinery/pkg/types" | ||||
| 	"k8s.io/apimachinery/pkg/util/sets" | ||||
| 	utilvalidation "k8s.io/apimachinery/pkg/util/validation" | ||||
| 	"k8s.io/apimachinery/pkg/util/version" | ||||
| 	utilfeature "k8s.io/apiserver/pkg/util/feature" | ||||
| 	runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" | ||||
| 	"k8s.io/klog/v2" | ||||
| @@ -63,7 +62,6 @@ import ( | ||||
| 	kubetypes "k8s.io/kubernetes/pkg/kubelet/types" | ||||
| 	"k8s.io/kubernetes/pkg/kubelet/util/format" | ||||
| 	utilfs "k8s.io/kubernetes/pkg/util/filesystem" | ||||
| 	utilkernel "k8s.io/kubernetes/pkg/util/kernel" | ||||
| 	utilpod "k8s.io/kubernetes/pkg/util/pod" | ||||
| 	volumeutil "k8s.io/kubernetes/pkg/volume/util" | ||||
| 	"k8s.io/kubernetes/pkg/volume/util/hostutil" | ||||
| @@ -132,16 +130,6 @@ func (kl *Kubelet) getKubeletMappings() (uint32, uint32, error) { | ||||
|  | ||||
| 	if !utilfeature.DefaultFeatureGate.Enabled(features.UserNamespacesSupport) { | ||||
| 		return defaultFirstID, defaultLen, nil | ||||
| 	} else { | ||||
| 		kernelVersion, err := utilkernel.GetVersion() | ||||
| 		if err != nil { | ||||
| 			return 0, 0, fmt.Errorf("failed to get kernel version, unable to determine if feature %s can be supported : %w", | ||||
| 				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) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	_, err := user.Lookup(kubeletUser) | ||||
|   | ||||
| @@ -44,10 +44,6 @@ const TCPFinTimeoutNamespacedKernelVersion = "4.6" | ||||
| // (ref: https://github.com/torvalds/linux/commit/35dfb013149f74c2be1ff9c78f14e6a3cd1539d1) | ||||
| const IPVSConnReuseModeFixedKernelVersion = "5.9" | ||||
|  | ||||
| // UserNamespacesSupportKernelVersion is the kernel version where idmap for tmpfs support was added | ||||
| // (ref: https://github.com/torvalds/linux/commit/05e6295f7b5e05f09e369a3eb2882ec5b40fff20) | ||||
| const UserNamespacesSupportKernelVersion = "6.3" | ||||
|  | ||||
| const TmpfsNoswapSupportKernelVersion = "6.4" | ||||
|  | ||||
| // NFTablesKubeProxyKernelVersion is the lowest kernel version kube-proxy supports using | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kubernetes Prow Robot
					Kubernetes Prow Robot