mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-05 07:29:22 +00:00
Fix rootless regression in 1.22 (Set KubeletInUserNamespace gate) (#3901)
Fix issue 3900 Kubernetes 1.22 requires `KuebletInUserNamespace` feature gate to be set for rootless: https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/#userns-the-hard-way Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
)
|
||||
|
||||
func createRootlessConfig(argsMap map[string]string, hasCFS, hasPIDs bool) {
|
||||
argsMap["feature-gates=KubeletInUserNamespace"] = "true"
|
||||
// "/sys/fs/cgroup" is namespaced
|
||||
cgroupfsWritable := unix.Access("/sys/fs/cgroup", unix.W_OK) == nil
|
||||
if hasCFS && hasPIDs && cgroupfsWritable {
|
||||
|
||||
Reference in New Issue
Block a user