kubernetes-sigs / cluster-api-ipam-provider-in-cluster

An IPAM provider for Cluster API that manages pools of IP addresses using Kubernetes resources.
Apache License 2.0
72 stars 23 forks source link

Allow prefix 0 for public IP addresses #287

Closed lubedacht closed 1 week ago

lubedacht commented 1 week ago

We're currently working on our own provider: https://github.com/ionos-cloud/cluster-api-provider-ionoscloud

We would like to assign static public IP addresses to our nodes. The problem we have here is, that reserving IP addresses in IONOS Cloud is quite random. It might be that we reserve 2 IP addresses and one of them starts with 85.xxxx and the other one with 224.xxx

Currently the validation only allows to provide a prefix that has at least a value of 1. For public IP addresses this would mean, we could only make use of a subnet from either 0.0.0.0/1 and 128.0.0.0/1

Making use of two IPPools doesn't really make sense here, only thing that is blocking using a 0 prefix is the validation in the webhook.

Is there a reason why /0 is not allowed here or can this be updated?

mcbenjemaa commented 1 week ago

/kind bug