kubernetes/pkg/registry/core/service/ipallocator
Antonio Ojea ea99593fa1 Fix panic on ClusterIP allocation for /28 subnets
The ClusterIP allocator tries to reserve on part of the ServiceCIDR
to allocate static IPs to the Services.

The heuristic of the allocator to obtain the offset was taking into
account the whole range size, not the IPs available in the range, the
subnet address and the broadcast address for IPv4 are not available.

This caused that for CIDRs with 16 hosts, /28 for IPv4 and /124 for
IPv6, the offset calculated was higher than the max number of available
addresses on the allocator, causing this to panic.

Change-Id: I6c6f527b0a600b3612be37769e405b8fb3dd33a8
2023-01-25 20:32:40 +00:00
..
controller cleanup: remove duplicate import 2022-07-14 11:25:19 +08:00
storage graduate ServiceIPStaticSubrange to GA 2022-09-02 07:13:18 +02:00
bitmap_test.go Fix panic on ClusterIP allocation for /28 subnets 2023-01-25 20:32:40 +00:00
bitmap.go Fix panic on ClusterIP allocation for /28 subnets 2023-01-25 20:32:40 +00:00
interfaces.go refactor current ipallocator 2022-12-31 12:48:50 +00:00
metrics.go Fix cluster IP allocator metrics 2022-05-13 22:33:30 +09:00