From 102a034f4640741971f04b9eca129c658359069e Mon Sep 17 00:00:00 2001 From: Brendan Shephard <59072170+bshephar@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:59:01 +1000 Subject: [PATCH] Update controllers/dataplane/openstackdataplanenodeset_controller.go Co-authored-by: Fabricio Aguiar --- .../dataplane/openstackdataplanenodeset_controller.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controllers/dataplane/openstackdataplanenodeset_controller.go b/controllers/dataplane/openstackdataplanenodeset_controller.go index b4b3ea6e3..404f7776d 100644 --- a/controllers/dataplane/openstackdataplanenodeset_controller.go +++ b/controllers/dataplane/openstackdataplanenodeset_controller.go @@ -672,6 +672,14 @@ func (r *OpenStackDataPlaneNodeSetReconciler) machineConfigWatcherFn( return nil } + listOpts := []client.ListOption{ + client.InNamespace(obj.GetNamespace()), + } + if err := r.Client.List(ctx, nodeSets, listOpts...); err != nil { + Log.Error(err, "Unable to retrieve OpenStackDataPlaneNodeSetList") + return nil + } + requests := make([]reconcile.Request, 0, len(nodeSets.Items)) for _, nodeSet := range nodeSets.Items { requests = append(requests, reconcile.Request{