-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Cluster-API (CAPI) has introduced IPAddress and IPAddressClaim CRDs, along with support for a new provider type: the IPAMProvider. These CRDs, and the sub-project Cluster-API-ipam-provider-in-cluster, were inspired by Metal3's IP Address Manager. CAPI provides the IPAddress and IPAddressClaim CRD types and expects an IPAMProvider to supply IPPools to handle these resources. This is described in the CAPI IPAMProvider contract.
Since the Cluster-API CRDs differ slightly from their Metal3 counterparts, the original Metal3 IP Address Manager was not directly suitable as a CAPI IPAMProvider. To address this, I worked on adapting Metal3-IPAM into an official provider for CAPI. As of the CAPI v1.11.2 release, Metal3-IPAM is now an official IPAM provider.
CAPI always deploys its own IPAM CRDs. When Metal3 is deployed using clusterctl init --infrastructure metal3, the full Metal3-IPAM stack is also deployed. After the initial changes were merged, no IPAM is deployed unless the --ipam flag is specified. Metal3-IPAM can be deployed explicitly with --ipam metal3. CAPM3 has also added support for the CAPI IPAM contract. Since CAPM3 now supports two types of IPAM, it makes sense that they are deployed and used in the same way.
User Story
As a user when I deploy CAPM3 with Metal3-IPAM, I encounter two types of IP claims: ipclaims.ipam.metal3.io and ipclaims.ipam.cluster.x-k8s.io, and two types of IP addresses: ipaddresses.ipam.metal3.io and ipaddresses.ipam.cluster.x-k8s.io. As a user, I find it confusing that there are two resources with the same name.
As a developer I want the code base I am maintaining to be simple as possible. Currently handling these two slightly different CRDs add un necessary complexity and I want to simplify this.
Detailed Description
I propose a change to the Metal3-IPAM API. I have two suggestions in mind:
- Delete
IPClaimandIPAddressfrom Metal3-IPAM and rely solely on CAPI’sIPAddressClaimandIPAddressresources. - Rename and align
IPClaimandIPAddressin Metal3-IPAM with CAPI naming and conditions, reducing code complexity in both Metal3-IPAM and CAPM3.
Suggention 1 will make standalone use of Metal3's IPAM a bit more dificult. Users will have to get the IPAddress and IPAddressClaim CRDs from CAPI project. Suggestion 2 will require maintaining redundant CRDs.
/kind feature
Metadata
Metadata
Assignees
Labels
Type
Projects
Status