From 8fe1c8fc6aeaaab2c09141e11db3f171c74c9b2e Mon Sep 17 00:00:00 2001 From: bilbo Date: Tue, 6 Feb 2024 15:28:19 +0100 Subject: [PATCH] Adds Kind to ipaddress pool name index --- controllers/openstackfloatingippool_controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/openstackfloatingippool_controller.go b/controllers/openstackfloatingippool_controller.go index 6ee65140a3..7e2e78f612 100644 --- a/controllers/openstackfloatingippool_controller.go +++ b/controllers/openstackfloatingippool_controller.go @@ -456,6 +456,9 @@ func (r *OpenStackFloatingIPPoolReconciler) SetupWithManager(ctx context.Context if err := mgr.GetFieldIndexer().IndexField(ctx, &ipamv1.IPAddress{}, infrav1alpha1.OpenStackFloatingIPPoolNameIndex, func(rawObj client.Object) []string { ip := rawObj.(*ipamv1.IPAddress) + if ip.Spec.PoolRef.Kind != openStackFloatingIPPool { + return nil + } return []string{ip.Spec.PoolRef.Name} }); err != nil { return err