Skip to content

Commit

Permalink
Merge pull request #445 from weaveworks/fix-442
Browse files Browse the repository at this point in the history
Add an explicit ELB tag for public subnets
  • Loading branch information
errordeveloper authored Jan 17, 2019
2 parents 56cb79a + ce68fbb commit 474eb28
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/cfn/builder/vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ func (c *ClusterResourceSet) addSubnets(refRT *gfn.Value, topology api.SubnetTop
CidrBlock: gfn.NewString(subnet.CIDR.String()),
VpcId: c.vpc,
}
if topology == api.SubnetTopologyPrivate {
switch topology {
case api.SubnetTopologyPrivate:
subnet.Tags = []gfn.Tag{{
Key: gfn.NewString("kubernetes.io/role/internal-elb"),
Value: gfn.NewString("1"),
}}
case api.SubnetTopologyPublic:
subnet.Tags = []gfn.Tag{{
Key: gfn.NewString("kubernetes.io/role/elb"),
Value: gfn.NewString("1"),
}}
}
refSubnet := c.newResource("Subnet"+alias, subnet)
c.newResource("RouteTableAssociation"+alias, &gfn.AWSEC2SubnetRouteTableAssociation{
Expand Down

0 comments on commit 474eb28

Please sign in to comment.