lyft / cni-ipvlan-vpc-k8s

AWS VPC Kubernetes CNI driver using IPvlan
Apache License 2.0
360 stars 58 forks source link

pick subnets at psuedorandom, not by most available #101

Closed tomwans closed 10 months ago

tomwans commented 1 year ago

It's possible that when the number of IPs available gets low in a subnet, many instances can request IPs in the same subnet, which result in many IP allocations failing since there are more IPs requested than are available.

Instead, alleviate this issue by picking subnets at psuedo-random, and making sure we retry different subnets on different attempts.