diff --git a/control-plane/pkg/reconciler/consumergroup/controller.go b/control-plane/pkg/reconciler/consumergroup/controller.go index 804d690f6e..d93d658fb5 100644 --- a/control-plane/pkg/reconciler/consumergroup/controller.go +++ b/control-plane/pkg/reconciler/consumergroup/controller.go @@ -244,19 +244,18 @@ func getSelectorLabel(ssName string) map[string]string { } func createStatefulSetScheduler(ctx context.Context, c SchedulerConfig, lister scheduler.VPodLister) Scheduler { - ss := statefulsetscheduler.NewScheduler( - ctx, - system.Namespace(), - c.StatefulSetName, - lister, - c.RefreshPeriod, - c.Capacity, - "", // scheduler.SchedulerPolicyType field only applicable for old scheduler policy - nodeinformer.Get(ctx).Lister(), - newEvictor(ctx, zap.String("kafka.eventing.knative.dev/component", "evictor")).evict, - c.SchedulerPolicy, - c.DeSchedulerPolicy, - ) + ss, _ := statefulsetscheduler.New(ctx, &statefulsetscheduler.Config{ + StatefulSetNamespace: system.Namespace(), + StatefulSetName: c.StatefulSetName, + PodCapacity: c.Capacity, + RefreshPeriod: c.RefreshPeriod, + SchedulerPolicy: "", // scheduler.SchedulerPolicyType field only applicable for old scheduler policy + SchedPolicy: c.SchedulerPolicy, + DeschedPolicy: c.DeSchedulerPolicy, + Evictor: newEvictor(ctx, zap.String("kafka.eventing.knative.dev/component", "evictor")).evict, + VPodLister: lister, + NodeLister: nodeinformer.Get(ctx).Lister(), + }) return Scheduler{ Scheduler: ss,