Skip to content

Commit

Permalink
Fix build issue (switch to statefulsetscheduler.New())
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Sep 22, 2023
1 parent f0126db commit 1510f58
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions control-plane/pkg/reconciler/consumergroup/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1510f58

Please sign in to comment.