Currently subnets are created with /26 netmask and VMs get a /32 IP. For kubernetes CNI, we need to have bigger subnets (perferably /16) so each VM gets a /24 range to host pods and assign an IP from subnet to them. In this commit, based on the subnet mask, we always try to assign at most 2**8 ips to each vm. If the subnet mask is 26 min(32, 26+8) would be calculated which is 32 so each VM gets a /32 ip. but for bigger subnets, VMs would get at most 256 ips.
17 KiB
17 KiB