Skip to content

Commit 8fe1c8f

Browse files
committed
Adds Kind to ipaddress pool name index
1 parent 84e1f4e commit 8fe1c8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/openstackfloatingippool_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,9 @@ func (r *OpenStackFloatingIPPoolReconciler) SetupWithManager(ctx context.Context
456456

457457
if err := mgr.GetFieldIndexer().IndexField(ctx, &ipamv1.IPAddress{}, infrav1alpha1.OpenStackFloatingIPPoolNameIndex, func(rawObj client.Object) []string {
458458
ip := rawObj.(*ipamv1.IPAddress)
459+
if ip.Spec.PoolRef.Kind != openStackFloatingIPPool {
460+
return nil
461+
}
459462
return []string{ip.Spec.PoolRef.Name}
460463
}); err != nil {
461464
return err

0 commit comments

Comments
 (0)