mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Remove redundant createAllPodsLW
This commit is contained in:
parent
f24f475bfe
commit
9e7ce8ddb3
@ -922,7 +922,8 @@ func (ks *MesosScheduler) recoverTasks() error {
|
|||||||
// Create creates a scheduler plugin and all supporting background functions.
|
// Create creates a scheduler plugin and all supporting background functions.
|
||||||
func (k *MesosScheduler) NewDefaultPluginConfig(terminate <-chan struct{}, mux *http.ServeMux) *PluginConfig {
|
func (k *MesosScheduler) NewDefaultPluginConfig(terminate <-chan struct{}, mux *http.ServeMux) *PluginConfig {
|
||||||
// use ListWatch watching pods using the client by default
|
// 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,
|
func (k *MesosScheduler) NewPluginConfig(terminate <-chan struct{}, mux *http.ServeMux,
|
||||||
|
@ -354,9 +354,3 @@ func parseSelectorOrDie(s string) fields.Selector {
|
|||||||
}
|
}
|
||||||
return 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(""))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user