mirror of https://github.com/k3s-io/k3s
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>pull/3902/head
parent
66dacc6ee0
commit
176451f4ea
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue