mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 22:37:55 -05:00
The Amazon VPC CNI plugin's prefix delegation hands a node IPv4 /28 prefixes of its subnet, listed on the node's network interface, and the AWS Load Balancer Controller finds the interface behind a pod address by looking for the prefix that holds it. With floci.services.eks.vpc-pod-network, a node holding an address in a Docker-backed subnet now also leases vpc-pod-prefixes /28 prefixes of that subnet, two by default, as a node running pods holds under the VPC CNI's default WARM_PREFIX_TARGET of one. DescribeInstances and DescribeNetworkInterfaces list them on the node's interface in ipv4PrefixSet. EC2 leases a prefix from the top of the subnet down, clear of the subnet's last address and of every address something holds, Docker's own container addresses on the VPC network included, and counts its sixteen addresses as held, so no instance or interface gets one and AvailableIpAddressCount leaves them out. The node keeps its prefixes across a restart as it keeps its address, re-reserving them; an adopted node leases no new ones, and a stopped or failed start gives them back. Part of #5929