kube-scheduler: move stopCh creation out of scheduler factory code

Enforces clean ownership of the channel.
This commit is contained in:
Dr. Stefan Schimanski
2018-10-11 10:49:31 +02:00
parent cb95edafe8
commit d91feb6d18
12 changed files with 79 additions and 59 deletions

View File

@@ -160,6 +160,7 @@ func run(cmd *cobra.Command, args []string, opts *options.Options) error {
storageClassInformer,
c.Recorder,
c.ComponentConfig.AlgorithmSource,
stopCh,
scheduler.WithName(c.ComponentConfig.SchedulerName),
scheduler.WithHardPodAffinitySymmetricWeight(c.ComponentConfig.HardPodAffinitySymmetricWeight),
scheduler.WithEquivalenceClassCacheEnabled(c.ComponentConfig.EnableContentionProfiling),