Skip to content

Commit

Permalink
Optionally support dedicated pod subnets
Browse files Browse the repository at this point in the history
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
  • Loading branch information
mikkeloscar committed Jan 13, 2025
1 parent a97d1b6 commit 780afe5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions provisioner/clusterpy.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const (
subnetELBRoleTagName = "kubernetes.io/role/elb"
subnetNodeRoleTagName = "kubernetes.io/role/node"
subnetInternalNodeRoleTagName = "kubernetes.io/role/internal-node"
subnetPodRoleTagName = "kubernetes.io/role/pod"
resourceLifecycleShared = "shared"
resourceLifecycleOwned = "owned"
mainStackTagKey = "cluster-lifecycle-controller.zalando.org/main-stack"
Expand Down Expand Up @@ -224,6 +225,7 @@ func (p *clusterpyProvisioner) provision(
azInfoLBs := selectSubnetIDs(subnets, subnetELBRoleTagName)
azInfoNodes := selectSubnetIDs(subnets, subnetNodeRoleTagName)
azInfoIntenalNodes := selectSubnetIDs(subnets, subnetInternalNodeRoleTagName)
azInfoPods := selectSubnetIDs(subnets, subnetPodRoleTagName)

// if availability zones are defined, filter the subnet list
if azNames, ok := cluster.ConfigItems[availabilityZonesConfigItemKey]; ok {
Expand Down Expand Up @@ -270,6 +272,7 @@ func (p *clusterpyProvisioner) provision(
subnetIPV6CIDRsKey: strings.Join(azInfoNodes.SubnetIPv6CIDRs(), ","),
"lb_subnets": azInfoLBs.SubnetsByAZ(),
"internal_node_subnets": azInfoIntenalNodes.SubnetsByAZ(),
"pod_subnets": azInfoPods.SubnetsByAZ(),
"hosted_zone": hostedZone,
"load_balancer_certificate": loadBalancerCert.ID(),
"vpc_ipv4_cidr": aws.StringValue(vpc.CidrBlock),
Expand Down

0 comments on commit 780afe5

Please sign in to comment.