Skip to content

Commit

Permalink
eks/cluster/vpc: tag subnets with cluster name
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Oct 6, 2021
1 parent 3780697 commit 41beff1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eks/cluster/vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,11 @@ func (ts *tester) createPublicSubnets() error {
Key: aws_v2.String("kubernetes.io/role/internal-elb"),
Value: aws_v2.String("1"),
},
{
// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.htmls
Key: aws_v2.String(fmt.Sprintf("kubernetes.io/cluster/%s", ts.cfg.EKSConfig.Name)),
Value: aws_v2.String("owned"),
},
},
},
},
Expand Down Expand Up @@ -1171,6 +1176,11 @@ func (ts *tester) createPrivateSubnets() error {
Key: aws_v2.String("Network"),
Value: aws_v2.String("Private"),
},
{
// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.htmls
Key: aws_v2.String(fmt.Sprintf("kubernetes.io/cluster/%s", ts.cfg.EKSConfig.Name)),
Value: aws_v2.String("owned"),
},
},
},
},
Expand Down

0 comments on commit 41beff1

Please sign in to comment.