Skip to content

Commit 4d81532

Browse files
authored
Merge pull request #1864 from elastx/fix_pool_name_index
🐛 Adds Kind to ipaddress pool name index
2 parents c9b628f + 8fe1c8f commit 4d81532

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)