Skip to content

Commit 363f1d8

Browse files
committed
bug: context missing from EventsToRegister
Problem: the custom scheduler plugin interface now requires a context variable (which is empty/not used) Solution: add context.Context for it. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
1 parent 29f411e commit 363f1d8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sig-scheduler-plugins/pkg/fluence/fluence.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,15 @@ func (fluence *Fluence) Name() string {
140140

141141
// Fluence has added delete, although I wonder if update includes that signal
142142
// and it's redundant?
143-
func (fluence *Fluence) EventsToRegister() []framework.ClusterEventWithHint {
143+
func (fluence *Fluence) EventsToRegister(_ context.Context) ([]framework.ClusterEventWithHint, error) {
144144
// To register a custom event, follow the naming convention at:
145-
// https://git.k8s.io/kubernetes/pkg/scheduler/eventhandlers.go#L403-L410
145+
// https://github.com/kubernetes/kubernetes/pull/101394
146+
// Please follow: eventhandlers.go#L403-L410
146147
podGroupGVK := fmt.Sprintf("podgroups.v1alpha1.%v", scheduling.GroupName)
147148
return []framework.ClusterEventWithHint{
148149
{Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.Add | framework.Delete}},
149150
{Event: framework.ClusterEvent{Resource: framework.GVK(podGroupGVK), ActionType: framework.Add | framework.Update | framework.Delete}},
150-
}
151+
}, nil
151152
}
152153

153154
// TODO we need to account for affinity here

0 commit comments

Comments
 (0)