Fix comments; switch to watching nodes
This commit is contained in:
@@ -168,13 +168,7 @@ func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys util.StringSe
|
||||
|
||||
// Watch minions.
|
||||
// Minions may be listed frequently, so provide a local up-to-date cache.
|
||||
if false {
|
||||
// Disable this code until minions support watches. Note when this code is enabled,
|
||||
// we need to make sure minion ListWatcher has proper FieldSelector.
|
||||
cache.NewReflector(f.createMinionLW(), &api.Node{}, f.NodeLister.Store, 10*time.Second).RunUntil(f.StopEverything)
|
||||
} else {
|
||||
cache.NewPoller(f.pollMinions, 10*time.Second, f.NodeLister.Store).RunUntil(f.StopEverything)
|
||||
}
|
||||
cache.NewReflector(f.createMinionLW(), &api.Node{}, f.NodeLister.Store, 0).RunUntil(f.StopEverything)
|
||||
|
||||
// Watch and cache all service objects. Scheduler needs to find all pods
|
||||
// created by the same service, so that it can spread them correctly.
|
||||
@@ -232,7 +226,7 @@ func (factory *ConfigFactory) createAssignedPodLW() *cache.ListWatch {
|
||||
|
||||
// createMinionLW returns a cache.ListWatch that gets all changes to minions.
|
||||
func (factory *ConfigFactory) createMinionLW() *cache.ListWatch {
|
||||
return cache.NewListWatchFromClient(factory.Client, "minions", api.NamespaceAll, parseSelectorOrDie(""))
|
||||
return cache.NewListWatchFromClient(factory.Client, "nodes", api.NamespaceAll, parseSelectorOrDie(""))
|
||||
}
|
||||
|
||||
// Lists all minions and filter out unhealthy ones, then returns
|
||||
|
Reference in New Issue
Block a user