From 89e2feaf4696af4ba456564926a576ddba8597a4 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 20 Aug 2024 10:49:08 +0200 Subject: [PATCH] DRA scheduler: fix feature gate check for PodSchedulingContext event The event is only relevant when DRAControlPlaneController (= "classic DRA") is enabled. This change has no effect in practice because the only plugin using this event, the dynamic resource plugin, also checks feature gates when asking for events and correctly only asks for PodSchedulingContext events when DRAControlPlaneController is enabled. --- pkg/scheduler/eventhandlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheduler/eventhandlers.go b/pkg/scheduler/eventhandlers.go index a68db516b68..e1c37eb4611 100644 --- a/pkg/scheduler/eventhandlers.go +++ b/pkg/scheduler/eventhandlers.go @@ -514,7 +514,7 @@ func addAllEventHandlers( } handlers = append(handlers, handlerRegistration) case framework.PodSchedulingContext: - if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { + if utilfeature.DefaultFeatureGate.Enabled(features.DRAControlPlaneController) { if handlerRegistration, err = informerFactory.Resource().V1alpha3().PodSchedulingContexts().Informer().AddEventHandler( buildEvtResHandler(at, framework.PodSchedulingContext, "PodSchedulingContext"), ); err != nil {