Skip to content

Commit 1c9840c

Browse files
authored
Merge pull request kubernetes#130243 from rata/revert-userns-kernel-check
Revert userns kernel check
2 parents c7088e6 + 7deb49e commit 1c9840c

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

pkg/kubelet/kubelet_pods.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import (
4141
"k8s.io/apimachinery/pkg/types"
4242
"k8s.io/apimachinery/pkg/util/sets"
4343
utilvalidation "k8s.io/apimachinery/pkg/util/validation"
44-
"k8s.io/apimachinery/pkg/util/version"
4544
utilfeature "k8s.io/apiserver/pkg/util/feature"
4645
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
4746
"k8s.io/klog/v2"
@@ -63,7 +62,6 @@ import (
6362
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
6463
"k8s.io/kubernetes/pkg/kubelet/util/format"
6564
utilfs "k8s.io/kubernetes/pkg/util/filesystem"
66-
utilkernel "k8s.io/kubernetes/pkg/util/kernel"
6765
utilpod "k8s.io/kubernetes/pkg/util/pod"
6866
volumeutil "k8s.io/kubernetes/pkg/volume/util"
6967
"k8s.io/kubernetes/pkg/volume/util/hostutil"
@@ -132,16 +130,6 @@ func (kl *Kubelet) getKubeletMappings() (uint32, uint32, error) {
132130

133131
if !utilfeature.DefaultFeatureGate.Enabled(features.UserNamespacesSupport) {
134132
return defaultFirstID, defaultLen, nil
135-
} else {
136-
kernelVersion, err := utilkernel.GetVersion()
137-
if err != nil {
138-
return 0, 0, fmt.Errorf("failed to get kernel version, unable to determine if feature %s can be supported : %w",
139-
features.UserNamespacesSupport, err)
140-
}
141-
if kernelVersion != nil && !kernelVersion.AtLeast(version.MustParseGeneric(utilkernel.UserNamespacesSupportKernelVersion)) {
142-
klog.InfoS("WARNING: the kernel version is incompatible with the feature gate, which needs as a minimum kernel version",
143-
"kernelVersion", kernelVersion, "feature", features.UserNamespacesSupport, "minKernelVersion", utilkernel.UserNamespacesSupportKernelVersion)
144-
}
145133
}
146134

147135
_, err := user.Lookup(kubeletUser)

pkg/util/kernel/constants.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ const TCPFinTimeoutNamespacedKernelVersion = "4.6"
4444
// (ref: https://github.com/torvalds/linux/commit/35dfb013149f74c2be1ff9c78f14e6a3cd1539d1)
4545
const IPVSConnReuseModeFixedKernelVersion = "5.9"
4646

47-
// UserNamespacesSupportKernelVersion is the kernel version where idmap for tmpfs support was added
48-
// (ref: https://github.com/torvalds/linux/commit/05e6295f7b5e05f09e369a3eb2882ec5b40fff20)
49-
const UserNamespacesSupportKernelVersion = "6.3"
50-
5147
const TmpfsNoswapSupportKernelVersion = "6.4"
5248

5349
// NFTablesKubeProxyKernelVersion is the lowest kernel version kube-proxy supports using

0 commit comments

Comments
 (0)