-
Notifications
You must be signed in to change notification settings - Fork 637
Description
/kind bug
/kind api-change
The changes introduced in #3748 (aimed at solving server side apply issues with Cluster Class) break existing use-cases around subnets created by CAPA.
The change makes the ID property on SubnetSpec now be a required field where previously this was optional. This change means that configuration to subnets used for CAPA clusters can now only be done if infrastructure is created by the user resulting in CAPA only allowing for either the default subnet layout or a bring-your-own network where the user would be required to create everything (VPC, subnets, etc.) externally before the creation of the AWSCluster CR.
With v1beta1 and earlier it was possible to specify some of the subnet configuration (such as the CIDR block and the AWS tags) but still have CAPA create the resources for you.
For example, we have a situation where we need more control over what resources end up in what subnets and rely on AWS tags and subnet filters to achieve this.
spec:
network:
subnets:
- cidrBlock: 10.0.0.0/24
availabilityZone: eu-west-1a
tags:
subnet-role: control-plane
- cidrBlock: 10.0.1.0/24
availabilityZone: eu-west-1b
tags:
subnet-role: control-plane
... etc ...With this approach we can configure CAPA to create all the subnets we need, with the tags we can then filter on, without having to use an external process to create these resources. This is no longer possible with v1beta2.
In the PR it was acknowledged that this was a breaking change and that we'd need to come up with an alternative to solve this problem going forward but unfortunately was forgotten about so I'm opening this issue to have that discussion and try to come up with a solution to both the original issue the PR was fixing and the use cases currently in use that require configuring subnets in CAPA.
This also fits into the wider discussion around networking in CAPA and the improvements / changes desired.
Related:
- Make subnet spec id field required for SSA to work with CC #3748
- SubnetSpec 'ID' must not be required field #3883
- https://kubernetes.slack.com/archives/CD6U2V71N/p1675159432540519
- https://kubernetes.slack.com/archives/CD6U2V71N/p1675159036932519
Environment:
- Cluster-api-provider-aws version: v2.0.2
- Kubernetes version: (use
kubectl version): - OS (e.g. from
/etc/os-release):