Skip to content

Commit

Permalink
Add ordering fix for inflightIPs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed May 15, 2024
1 parent d794aae commit e671e9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/providers/subnet/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ func (p *Provider) ZonalSubnetsForLaunch(ctx context.Context, nodeClass *v1beta1
if ips, ok := p.inflightIPs[*subnets[j].SubnetId]; ok {
jIPs = ips
}
return iIPs < jIPs
if iIPs != jIPs {
return iIPs < jIPs
}
return *subnets[i].SubnetId < *subnets[j].SubnetId
})
for _, subnet := range subnets {
zonalSubnets[*subnet.AvailabilityZone] = subnet
Expand Down

0 comments on commit e671e9f

Please sign in to comment.