From 5013bad8025ef6837c90ed9b99b44f0739c3701c Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Larsen Date: Tue, 5 Nov 2024 12:01:11 +0100 Subject: [PATCH] Optionally support dedicated pod subnets Signed-off-by: Mikkel Oscar Lyderik Larsen --- provisioner/clusterpy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/provisioner/clusterpy.go b/provisioner/clusterpy.go index ea02acba..db8e63c7 100644 --- a/provisioner/clusterpy.go +++ b/provisioner/clusterpy.go @@ -40,6 +40,7 @@ const ( tagNameKubernetesClusterPrefix = "kubernetes.io/cluster/" subnetELBRoleTagName = "kubernetes.io/role/elb" subnetNodeRoleTagName = "kubernetes.io/role/node" + subnetPodRoleTagName = "kubernetes.io/role/pod" resourceLifecycleShared = "shared" resourceLifecycleOwned = "owned" mainStackTagKey = "cluster-lifecycle-controller.zalando.org/main-stack" @@ -222,6 +223,7 @@ func (p *clusterpyProvisioner) provision( // find the best subnet for each AZ azInfoLBs := selectSubnetIDs(subnets, subnetELBRoleTagName) azInfoNodes := selectSubnetIDs(subnets, subnetNodeRoleTagName) + azInfoPods := selectSubnetIDs(subnets, subnetPodRoleTagName) // if availability zones are defined, filter the subnet list if azNames, ok := cluster.ConfigItems[availabilityZonesConfigItemKey]; ok { @@ -266,6 +268,7 @@ func (p *clusterpyProvisioner) provision( availabilityZonesValueKey: azInfoNodes.AvailabilityZones(), subnetIPV6CIDRsKey: strings.Join(azInfoNodes.SubnetIPv6CIDRs(), ","), "lb_subnets": azInfoLBs.SubnetsByAZ(), + "pod_subnets": azInfoPods.SubnetsByAZ(), "hosted_zone": hostedZone, "load_balancer_certificate": loadBalancerCert.ID(), "vpc_ipv4_cidr": aws.StringValue(vpc.CidrBlock),