From 6181e28311f7ea5fb6033ad747207b1b5b35b4cc Mon Sep 17 00:00:00 2001 From: rcarrata Date: Fri, 12 Jul 2019 15:24:30 +0200 Subject: [PATCH] add Tags Name for Master and Worker Nodes in the Cloudformation UPI AWS --- upi/aws/cloudformation/03_cluster_security.yaml | 10 ++++++++++ upi/aws/cloudformation/05_cluster_master_nodes.yaml | 6 ++++++ upi/aws/cloudformation/06_cluster_worker_node.yaml | 2 ++ 3 files changed, 18 insertions(+) diff --git a/upi/aws/cloudformation/03_cluster_security.yaml b/upi/aws/cloudformation/03_cluster_security.yaml index 6054637fd5b..0b6fa07918f 100644 --- a/upi/aws/cloudformation/03_cluster_security.yaml +++ b/upi/aws/cloudformation/03_cluster_security.yaml @@ -68,6 +68,11 @@ Resources: ToPort: 22623 CidrIp: !Ref VpcCidr VpcId: !Ref VpcId + Tags: + - Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]] + Value: "shared" + - Key: "Name" + Value: !Join ["-", [!Ref InfrastructureName, "sg-master"]] WorkerSecurityGroup: Type: AWS::EC2::SecurityGroup @@ -83,6 +88,11 @@ Resources: ToPort: 22 CidrIp: !Ref VpcCidr VpcId: !Ref VpcId + Tags: + - Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]] + Value: "shared" + - Key: "Name" + Value: !Join ["-", [!Ref InfrastructureName, "sg-worker"]] MasterIngressEtcd: Type: AWS::EC2::SecurityGroupIngress diff --git a/upi/aws/cloudformation/05_cluster_master_nodes.yaml b/upi/aws/cloudformation/05_cluster_master_nodes.yaml index 3cc53b5299b..2849e33a84f 100644 --- a/upi/aws/cloudformation/05_cluster_master_nodes.yaml +++ b/upi/aws/cloudformation/05_cluster_master_nodes.yaml @@ -188,6 +188,8 @@ Resources: Tags: - Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]] Value: "shared" + - Key: "Name" + Value: !Join ["", [!Ref InfrastructureName, "-master-0"]] RegisterMaster0: Condition: DoRegistration @@ -240,6 +242,8 @@ Resources: Tags: - Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]] Value: "shared" + - Key: "Name" + Value: !Join ["", [!Ref InfrastructureName, "-master-1"]] RegisterMaster1: Condition: DoRegistration @@ -292,6 +296,8 @@ Resources: Tags: - Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]] Value: "shared" + - Key: "Name" + Value: !Join ["", [!Ref InfrastructureName, "-master-2"]] RegisterMaster2: Condition: DoRegistration diff --git a/upi/aws/cloudformation/06_cluster_worker_node.yaml b/upi/aws/cloudformation/06_cluster_worker_node.yaml index d4e6f21918d..fb3871872fe 100644 --- a/upi/aws/cloudformation/06_cluster_worker_node.yaml +++ b/upi/aws/cloudformation/06_cluster_worker_node.yaml @@ -118,6 +118,8 @@ Resources: Tags: - Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]] Value: "shared" + - Key: "Name" + Value: !Join ["-", [!Ref InfrastructureName, "worker", "0"]] Outputs: PrivateIP: