Refactor schedulers, remove schedulers, use generic scheduler.

This commit is contained in:
Brendan Burns
2014-09-25 11:56:57 -07:00
parent 44703efe2e
commit 1bb962961c
8 changed files with 99 additions and 135 deletions

View File

@@ -62,7 +62,11 @@ func (factory *ConfigFactory) Create() *scheduler.Config {
}
r := rand.New(rand.NewSource(time.Now().UnixNano()))
algo := algorithm.NewRandomFitScheduler(
algo := algorithm.NewGenericScheduler(
// Fit is defined based on the absence of port conflicts.
[]algorithm.FitPredicate{algorithm.PodFitsPorts},
// All nodes where things fit are equally likely (Random)
algorithm.EqualPriority,
&storeToPodLister{podCache}, r)
return &scheduler.Config{