Switch away from the static node info

This commit is contained in:
Brendan Burns
2014-10-10 13:49:09 -07:00
parent b3292e947f
commit e6fa568ad4
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}),
},
// All nodes where things fit are equally likely (Random)
algorithm.EqualPriority,