diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index dd3b6605b9e..a3b41659eef 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -387,8 +387,10 @@ func (ks *KubeletExecutorServer) createAndInitKubelet( StaticPodsConfigPath: staticPodsConfigPath, }) - fileSourceUpdates := pc.Channel(kubelet.FileSource) go exec.InitializeStaticPodsSource(func() { + // Create file source only when we are called back. Otherwise, it is never marked unseen. + fileSourceUpdates := pc.Channel(kubelet.FileSource) + kconfig.NewSourceFile(staticPodsConfigPath, kc.Hostname, kc.FileCheckFrequency, fileSourceUpdates) })