Merge pull request #10219 from mesosphere/static-file-source-seen

Mesos: create static pod file source only for configured static pods
This commit is contained in:
Maxwell Forbes
2015-06-24 13:19:48 -07:00

View File

@@ -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)
})