Change scheduler constructors to receive a plugin registry.

This commit is contained in:
Bobby (Babak) Salamat
2019-04-16 16:37:14 -07:00
parent 54afaf2326
commit 77824f5135
3 changed files with 6 additions and 1 deletions

View File

@@ -132,6 +132,7 @@ func New(client clientset.Interface,
recorder record.EventRecorder,
schedulerAlgorithmSource kubeschedulerconfig.SchedulerAlgorithmSource,
stopCh <-chan struct{},
registry framework.Registry,
opts ...func(o *schedulerOptions)) (*Scheduler, error) {
options := defaultSchedulerOptions
@@ -156,7 +157,7 @@ func New(client clientset.Interface,
DisablePreemption: options.disablePreemption,
PercentageOfNodesToScore: options.percentageOfNodesToScore,
BindTimeoutSeconds: options.bindTimeoutSeconds,
Registry: framework.NewRegistry(),
Registry: registry,
})
var config *factory.Config
source := schedulerAlgorithmSource