From bd850291d4f8579388bbc5b6aa5f8ce4e0803eef Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Tue, 10 Dec 2024 12:54:44 -0800 Subject: [PATCH] fix --- controllers/schedulingpolicy_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/schedulingpolicy_controller.go b/controllers/schedulingpolicy_controller.go index c7f028c..9a26eca 100644 --- a/controllers/schedulingpolicy_controller.go +++ b/controllers/schedulingpolicy_controller.go @@ -103,7 +103,7 @@ func (r *SchedulingPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Req // fetch the list if deployment targets in the namespace with environment field equal to the namespace name deploymentTargets := &schedulerv1alpha1.DeploymentTargetList{} - err = r.List(ctx, deploymentTargets, client.InNamespace(req.Namespace), client.MatchingFields{"environment": req.Namespace}) + err = r.List(ctx, deploymentTargets, client.InNamespace(req.Namespace), client.MatchingFields{EnvironmentField: req.Namespace}) if err != nil { return r.manageFailure(ctx, reqLogger, schedulingPolicy, err, "Failed to list DeploymentTargets") }