Merge pull request #1736 from brendandburns/scheduler

Switch away from the static node info
This commit is contained in:
Dawn Chen
2014-10-10 15:01:09 -07:00
3 changed files with 17 additions and 7 deletions

View File

@@ -64,17 +64,12 @@ func (factory *ConfigFactory) Create() (*scheduler.Config, error) {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
// TODO: remove this construction-time listing.
nodes, err := factory.Client.ListMinions()
if err != nil {
return nil, err
}
algo := algorithm.NewGenericScheduler(
[]algorithm.FitPredicate{
// Fit is defined based on the absence of port conflicts.
algorithm.PodFitsPorts,
// Fit is determined by resource availability
algorithm.NewResourceFitPredicate(algorithm.StaticNodeInfo{nodes}),
algorithm.NewResourceFitPredicate(algorithm.ClientNodeInfo{factory.Client}),
},
// Prioritize nodes by least requested utilization.
algorithm.LeastRequestedPriority,