kube-scheduler: NewFramework function to pass the context parameter
Co-authored-by: Aldo Culquicondor <1299064+alculquicondor@users.noreply.github.com>
This commit is contained in:
@@ -81,11 +81,11 @@ func StartScheduler(ctx context.Context, clientSet clientset.Interface, kubeConf
|
||||
evtBroadcaster.StartRecordingToSink(ctx.Done())
|
||||
|
||||
sched, err := scheduler.New(
|
||||
ctx,
|
||||
clientSet,
|
||||
informerFactory,
|
||||
nil,
|
||||
profile.NewRecorderFactory(evtBroadcaster),
|
||||
ctx.Done(),
|
||||
scheduler.WithKubeConfig(kubeConfig),
|
||||
scheduler.WithProfiles(cfg.Profiles...),
|
||||
scheduler.WithPercentageOfNodesToScore(cfg.PercentageOfNodesToScore),
|
||||
@@ -446,11 +446,11 @@ func InitTestSchedulerWithOptions(
|
||||
|
||||
opts = append(opts, scheduler.WithKubeConfig(testCtx.KubeConfig))
|
||||
testCtx.Scheduler, err = scheduler.New(
|
||||
ctx,
|
||||
testCtx.ClientSet,
|
||||
testCtx.InformerFactory,
|
||||
testCtx.DynInformerFactory,
|
||||
profile.NewRecorderFactory(eventBroadcaster),
|
||||
ctx.Done(),
|
||||
opts...,
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user