Watch pods in executor and tell kubelet about graceful terminations
- instantiate framework.Controller for pods in the executor using framework.NewInformer, in order to watch pod updates for pods on that host - forwards updates like graceful termination to the kubelet. This might also be the preparation for other updates which are supported by the kubelet.
This commit is contained in:
@@ -36,8 +36,10 @@ import (
|
||||
"k8s.io/kubernetes/contrib/mesos/pkg/hyperkube"
|
||||
"k8s.io/kubernetes/contrib/mesos/pkg/redirfd"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/client/cache"
|
||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/credentialprovider"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
"k8s.io/kubernetes/pkg/healthz"
|
||||
"k8s.io/kubernetes/pkg/kubelet"
|
||||
"k8s.io/kubernetes/pkg/kubelet/cadvisor"
|
||||
@@ -372,6 +374,7 @@ func (ks *KubeletExecutorServer) createAndInitKubelet(
|
||||
return klet.GetRuntime().GetPodStatus(pod)
|
||||
},
|
||||
StaticPodsConfigPath: staticPodsConfigPath,
|
||||
PodLW: cache.NewListWatchFromClient(kc.KubeClient, "pods", api.NamespaceAll, fields.OneTermEqualSelector(client.PodHost, kc.NodeName)),
|
||||
})
|
||||
|
||||
go exec.InitializeStaticPodsSource(func() {
|
||||
|
Reference in New Issue
Block a user