Skip to content

Commit

Permalink
Rename variable
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 Oct 25, 2024
1 parent ec49804 commit 4e3f754
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions provisioner/clusterpy.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,18 @@ func (p *clusterpyProvisioner) provision(

// find the best subnet for each AZ
azInfoLBs := selectSubnetIDs(subnets, subnetELBRoleTagName)
azInfoWorkers := selectSubnetIDs(subnets, subnetNodeRoleTagName)
azInfoNodes := selectSubnetIDs(subnets, subnetNodeRoleTagName)

// if availability zones are defined, filter the subnet list
if azNames, ok := cluster.ConfigItems[availabilityZonesConfigItemKey]; ok {
azInfoLBs = azInfoLBs.RestrictAZs(strings.Split(azNames, ","))
azInfoWorkers = azInfoWorkers.RestrictAZs(strings.Split(azNames, ","))
azInfoNodes = azInfoNodes.RestrictAZs(strings.Split(azNames, ","))
}

// optional config item to hard-code subnets. This is useful for
// migrating between subnets.
if _, ok := cluster.ConfigItems[subnetsConfigItemKey]; !ok {
cluster.ConfigItems[subnetsConfigItemKey] = azInfoWorkers.SubnetsByAZ()[subnetAllAZName]
cluster.ConfigItems[subnetsConfigItemKey] = azInfoNodes.SubnetsByAZ()[subnetAllAZName]
}

apiURL, err := url.Parse(cluster.APIServerURL)
Expand Down Expand Up @@ -262,9 +262,9 @@ func (p *clusterpyProvisioner) provision(
}

values := map[string]interface{}{
subnetsValueKey: azInfoWorkers.SubnetsByAZ(),
availabilityZonesValueKey: azInfoWorkers.AvailabilityZones(),
subnetIPV6CIDRsKey: strings.Join(azInfoWorkers.SubnetIPv6CIDRs(), ","),
subnetsValueKey: azInfoNodes.SubnetsByAZ(),
availabilityZonesValueKey: azInfoNodes.AvailabilityZones(),
subnetIPV6CIDRsKey: strings.Join(azInfoNodes.SubnetIPv6CIDRs(), ","),
"lb_subnets": azInfoLBs.SubnetsByAZ(),
"hosted_zone": hostedZone,
"load_balancer_certificate": loadBalancerCert.ID(),
Expand Down Expand Up @@ -355,7 +355,7 @@ func (p *clusterpyProvisioner) provision(
encodeUserData: true,
instanceTypes: instanceTypes,
},
azInfo: azInfoWorkers,
azInfo: azInfoNodes,
}

karpenterProvisioner, err := NewKarpenterNodePoolProvisioner(
Expand Down

0 comments on commit 4e3f754

Please sign in to comment.