diff --git a/pkg/scheduler/generic_scheduler.go b/pkg/scheduler/generic_scheduler.go index 1f119ce5caf..0d5673925d4 100644 --- a/pkg/scheduler/generic_scheduler.go +++ b/pkg/scheduler/generic_scheduler.go @@ -150,9 +150,9 @@ func EqualPriority(pod api.Pod, podLister PodLister, minionLister MinionLister) func NewGenericScheduler(predicates []FitPredicate, prioritizers []PriorityFunction, pods PodLister, random *rand.Rand) Scheduler { return &genericScheduler{ - predicates: predicates, + predicates: predicates, prioritizers: prioritizers, - pods: pods, - random: random, + pods: pods, + random: random, } } diff --git a/pkg/scheduler/spreading.go b/pkg/scheduler/spreading.go index cda90d460b5..7bc69240ee3 100644 --- a/pkg/scheduler/spreading.go +++ b/pkg/scheduler/spreading.go @@ -50,7 +50,7 @@ func CalculateSpreadPriority(pod api.Pod, podLister PodLister, minionLister Mini // than the filtered minion count values := make([]int, len(counts)) idx := 0 - for _, count := range counts { + for _, count := range counts { values[idx] = count idx++ } @@ -62,7 +62,7 @@ func CalculateSpreadPriority(pod api.Pod, podLister PodLister, minionLister Mini //score int for _, minion := range minions.Items { if maxCount > 0 { - fScore = 100 * ( float32(counts[minion.Name]) / float32(maxCount) ) + fScore = 100 * (float32(counts[minion.Name]) / float32(maxCount)) } result = append(result, HostPriority{host: minion.Name, score: int(fScore)}) } diff --git a/plugin/pkg/scheduler/factory/factory.go b/plugin/pkg/scheduler/factory/factory.go index 086002f95b3..ba6438067b9 100644 --- a/plugin/pkg/scheduler/factory/factory.go +++ b/plugin/pkg/scheduler/factory/factory.go @@ -58,11 +58,11 @@ type configFactory struct { func NewConfigFactory(client *client.Client) *configFactory { // initialize the factory struct factory := &configFactory{Client: client, - PodQueue: cache.NewFIFO(), - PodLister: &storeToPodLister{cache.NewStore()}, + PodQueue: cache.NewFIFO(), + PodLister: &storeToPodLister{cache.NewStore()}, MinionLister: &storeToMinionLister{cache.NewStore()}, PredicateMap: make(map[string]algorithm.FitPredicate), - PriorityMap: make(map[string]algorithm.PriorityFunction), + PriorityMap: make(map[string]algorithm.PriorityFunction), } // add default predicates