Skip to content

Commit

Permalink
Adds Kind to ipaddress pool name index
Browse files Browse the repository at this point in the history
  • Loading branch information
bilbobrovall committed Feb 6, 2024
1 parent 84e1f4e commit 8fe1c8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/openstackfloatingippool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fe1c8f

Please sign in to comment.