Metal3IO provides a way for provisioning baremetal hosts using ClusterAPI in Kubernetes. The whole flow of host provisioning from Cluster API to metal3 assumes the network setup is not their task and operator should provide a relevant cloud init for baremetal host to setup the network. This assumption works easily for DHCP enabled interfaces but in real scenarios there can be multiple networks of different types and some of them might not have any DHCP enabled. In these scenarios we need an IP Address Management (IPAM) scheme to statically allocate the IP addresses for each interface of each host. This document will collect the requirements for IPAM and provide a possible solution for its implementation.
Requirements:
- The solution should provide a way to statically allocate IP addresses to interfaces.
- There should be a notion of node-pools where user can provide IP address pool for each node-pool host's interface.
- Scaling up nodes in a node pool should get an IP address automatically from that pool's IP address range.
- Scaling down should free the previously allocated IP(s) from the node pool IP range.
- Each host should retain the IP address allocations in case of node upgrade or re-provisioning.