cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

Subnet division enhacement

Open MaxFedotov opened this issue 1 year ago • 5 comments
trafficstars

/kind feature

Describe the solution you'd like By default, Cluster API AWS organizes subnets so that most of the VPC address space goes to private subnets. While this is true for most classic Kubernetes deployments, that may not work in some specific cases.

We in Wargaming use Kuberentes to schedule arenas with gameservers using google agones. These arenas requires to be run on a node with a public IP address using hostPort. As pods with arenas are the main cluster workload, we need to dedicate most of VPC address space to the public subnets, instead of private.

In order to support this requirement, I would like to propose an additional configuration parameter in AWSCluster.spec.network.vpc - SubnetSchema with the following enum values:

  • PreferPrivate - will be the default value and will implement the current logic
  • PreferPublic - will have the reverse logic, where most of the VPC address space will be dedicated to public subnets
  • Equal - will divide VPC address space equally between public and private subnets

MaxFedotov avatar Feb 09 '24 14:02 MaxFedotov