mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
Merge pull request #12861 from mesosphere/empty-kubelet-container-vars
MESOS: Stop the kubelet from taking control over cgroups and other processes
This commit is contained in:
commit
e794e36a32
@ -131,13 +131,21 @@ func (s *KubeletExecutorServer) Run(hks hyperkube.Interface, _ []string) error {
|
||||
log.Info(err)
|
||||
}
|
||||
|
||||
// derive the executor cgroup and use it as docker cgroup root
|
||||
// derive the executor cgroup and use it as docker container cgroup root
|
||||
mesosCgroup := findMesosCgroup(s.cgroupPrefix)
|
||||
s.cgroupRoot = mesosCgroup
|
||||
s.SystemContainer = mesosCgroup
|
||||
s.ResourceContainer = mesosCgroup
|
||||
log.V(2).Infof("passing cgroup %q to the kubelet as cgroup root", s.CgroupRoot)
|
||||
|
||||
// empty string for the docker and system containers (= cgroup paths). This
|
||||
// stops the kubelet taking any control over other system processes.
|
||||
s.SystemContainer = ""
|
||||
s.DockerDaemonContainer = ""
|
||||
|
||||
// We set kubelet container to its own cgroup below the executor cgroup.
|
||||
// In contrast to the docker and system container, this has no other
|
||||
// undesired side-effects.
|
||||
s.ResourceContainer = mesosCgroup + "/kubelet"
|
||||
|
||||
// create apiserver client
|
||||
var apiclient *client.Client
|
||||
clientConfig, err := s.CreateAPIServerClientConfig()
|
||||
|
Loading…
Reference in New Issue
Block a user