mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 20:17:41 +00:00
Stop the kubelet from taking control over cgroups and other processes
This commit is contained in:
parent
b2e363fa08
commit
8ddcb222e9
@ -99,6 +99,12 @@ func NewKubeletExecutorServer() *KubeletExecutorServer {
|
|||||||
k.Address = net.ParseIP(defaultBindingAddress())
|
k.Address = net.ParseIP(defaultBindingAddress())
|
||||||
k.ShutdownFD = -1 // indicates unspecified FD
|
k.ShutdownFD = -1 // indicates unspecified FD
|
||||||
|
|
||||||
|
// empty string for all containers (= cgroup paths) which stop the kubelet
|
||||||
|
// from taking any control over the cgroups of itself and other system processes.
|
||||||
|
k.SystemContainer = ""
|
||||||
|
k.ResourceContainer = ""
|
||||||
|
k.DockerDaemonContainer = ""
|
||||||
|
|
||||||
return k
|
return k
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,8 +140,6 @@ func (s *KubeletExecutorServer) Run(hks hyperkube.Interface, _ []string) error {
|
|||||||
// derive the executor cgroup and use it as docker cgroup root
|
// derive the executor cgroup and use it as docker cgroup root
|
||||||
mesosCgroup := findMesosCgroup(s.cgroupPrefix)
|
mesosCgroup := findMesosCgroup(s.cgroupPrefix)
|
||||||
s.cgroupRoot = mesosCgroup
|
s.cgroupRoot = mesosCgroup
|
||||||
s.SystemContainer = mesosCgroup
|
|
||||||
s.ResourceContainer = mesosCgroup
|
|
||||||
log.V(2).Infof("passing cgroup %q to the kubelet as cgroup root", s.CgroupRoot)
|
log.V(2).Infof("passing cgroup %q to the kubelet as cgroup root", s.CgroupRoot)
|
||||||
|
|
||||||
// create apiserver client
|
// create apiserver client
|
||||||
|
Loading…
Reference in New Issue
Block a user