Remove redundant createAllPodsLW

This commit is contained in:
Dr. Stefan Schimanski 2015-10-26 14:13:56 -05:00
parent f24f475bfe
commit 9e7ce8ddb3
2 changed files with 2 additions and 7 deletions

View File

@ -922,7 +922,8 @@ func (ks *MesosScheduler) recoverTasks() error {
// Create creates a scheduler plugin and all supporting background functions.
func (k *MesosScheduler) NewDefaultPluginConfig(terminate <-chan struct{}, mux *http.ServeMux) *PluginConfig {
// use ListWatch watching pods using the client by default
return k.NewPluginConfig(terminate, mux, createAllPodsLW(k.client))
lw := cache.NewListWatchFromClient(k.client, "pods", api.NamespaceAll, parseSelectorOrDie(""))
return k.NewPluginConfig(terminate, mux, lw)
}
func (k *MesosScheduler) NewPluginConfig(terminate <-chan struct{}, mux *http.ServeMux,

View File

@ -354,9 +354,3 @@ func parseSelectorOrDie(s string) fields.Selector {
}
return selector
}
// createAllPodsLW returns a listWatch that finds all pods
func createAllPodsLW(cl *client.Client) *cache.ListWatch {
return cache.NewListWatchFromClient(cl, "pods", api.NamespaceAll, parseSelectorOrDie(""))
}