1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00

BZ1697236: Updating tags/names to use InfrastructureName

This commit is contained in:
Stephen Cuppett
2019-04-15 09:45:38 -04:00
parent b79c36cbfa
commit 71067682a8
5 changed files with 59 additions and 48 deletions

View File

@@ -208,7 +208,7 @@ Resources:
RegisterTargetLambdaIamRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Join ["-", [!Ref ClusterName, "nlb", "lambda", "role"]]
RoleName: !Join ["-", [!Ref InfrastructureName, "nlb", "lambda", "role"]]
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
@@ -220,7 +220,7 @@ Resources:
- "sts:AssumeRole"
Path: "/"
Policies:
- PolicyName: !Join ["-", [!Ref ClusterName, "master", "policy"]]
- PolicyName: !Join ["-", [!Ref InfrastructureName, "master", "policy"]]
PolicyDocument:
Version: "2012-10-17"
Statement:
@@ -273,7 +273,7 @@ Resources:
RegisterSubnetTagsLambdaIamRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Join ["-", [!Ref ClusterName, "subnet-tags-lambda-role"]]
RoleName: !Join ["-", [!Ref InfrastructureName, "subnet-tags-lambda-role"]]
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
@@ -285,7 +285,7 @@ Resources:
- "sts:AssumeRole"
Path: "/"
Policies:
- PolicyName: !Join ["-", [!Ref ClusterName, "subnet-tagging-policy"]]
- PolicyName: !Join ["-", [!Ref InfrastructureName, "subnet-tagging-policy"]]
PolicyDocument:
Version: "2012-10-17"
Statement:

View File

@@ -2,10 +2,12 @@ AWSTemplateFormatVersion: 2010-09-09
Description: Template for Openshift Cluster UPI Security Elements (Security Groups & IAM)
Parameters:
ClusterName:
InfrastructureName:
AllowedPattern: ^([a-zA-Z][a-zA-Z0-9\-]{0,31})$
ConstraintDescription: Cluster name must be alphanumeric, start with a letter and a maximum of 32 characters
Description: A short, representative cluster name to use for hostnames, etc.
MaxLength: 32
MinLength: 1
ConstraintDescription: Infrastructure name must be alphanumeric, start with a letter and a maximum of 32 characters
Description: A short, unique cluster ID used to tag cloud resources and identify items owned/used by the cluster.
Type: String
VpcCidr:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-4]))$
@@ -26,7 +28,7 @@ Metadata:
- Label:
default: "Cluster Information"
Parameters:
- ClusterName
- InfrastructureName
- Label:
default: "Network Configuration"
Parameters:
@@ -34,8 +36,8 @@ Metadata:
- VpcCidr
- PrivateSubnets
ParameterLabels:
ClusterName:
default: "Cluster Name"
InfrastructureName:
default: "Infrastructure Name"
VpcId:
default: "VPC ID"
VpcCidr:
@@ -47,7 +49,7 @@ Resources:
MasterSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: !Join ["-", ["master-sg", !Ref ClusterName]]
GroupName: !Join ["-", ["master-sg", !Ref InfrastructureName]]
GroupDescription: Cluster Master Security Group
SecurityGroupIngress:
- IpProtocol: icmp
@@ -71,7 +73,7 @@ Resources:
WorkerSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: !Join ["-", ["worker-sg", !Ref ClusterName]]
GroupName: !Join ["-", ["worker-sg", !Ref InfrastructureName]]
GroupDescription: Cluster Worker Security Group
SecurityGroupIngress:
- IpProtocol: icmp
@@ -257,7 +259,7 @@ Resources:
MasterIamRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Join ["-", [!Ref ClusterName, "master", "role"]]
RoleName: !Join ["-", [!Ref InfrastructureName, "master", "role"]]
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
@@ -269,7 +271,7 @@ Resources:
- "sts:AssumeRole"
Path: "/"
Policies:
- PolicyName: !Join ["-", [!Ref ClusterName, "master", "policy"]]
- PolicyName: !Join ["-", [!Ref InfrastructureName, "master", "policy"]]
PolicyDocument:
Version: "2012-10-17"
Statement:
@@ -296,7 +298,7 @@ Resources:
WorkerIamRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Join ["-", [!Ref ClusterName, "worker", "role"]]
RoleName: !Join ["-", [!Ref InfrastructureName, "worker", "role"]]
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
@@ -308,7 +310,7 @@ Resources:
- "sts:AssumeRole"
Path: "/"
Policies:
- PolicyName: !Join ["-", [!Ref ClusterName, "worker", "policy"]]
- PolicyName: !Join ["-", [!Ref InfrastructureName, "worker", "policy"]]
PolicyDocument:
Version: "2012-10-17"
Statement:

View File

@@ -2,10 +2,12 @@ AWSTemplateFormatVersion: 2010-09-09
Description: Template for Openshift Cluster UPI Bootstrap (EC2 Instance, Security Groups and IAM)
Parameters:
ClusterName:
InfrastructureName:
AllowedPattern: ^([a-zA-Z][a-zA-Z0-9\-]{0,31})$
ConstraintDescription: Cluster name must be alphanumeric, start with a letter and a maximum of 32 characters
Description: A short, representative cluster name to use for hostnames, etc.
MaxLength: 32
MinLength: 1
ConstraintDescription: Infrastructure name must be alphanumeric, start with a letter and a maximum of 32 characters
Description: A short, unique cluster ID used to tag cloud resources and identify items owned/used by the cluster.
Type: String
RhcosAmi:
Description: Current RHEL CoreOS AMI to use for boostrap
@@ -55,7 +57,7 @@ Metadata:
- Label:
default: "Cluster Information"
Parameters:
- ClusterName
- InfrastructureName
- Label:
default: "Host Information"
Parameters:
@@ -77,8 +79,8 @@ Metadata:
- InternalApiTargetGroupArn
- InternalServiceTargetGroupArn
ParameterLabels:
ClusterName:
default: "Cluster Name"
InfrastructureName:
default: "Infrastructure Name"
VpcId:
default: "VPC ID"
AllowedBootstrapSshCidr:
@@ -101,7 +103,7 @@ Resources:
BootstrapIamRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Join ["-", [!Ref ClusterName, "bootstrap", "role"]]
RoleName: !Join ["-", [!Ref InfrastructureName, "bootstrap", "role"]]
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
@@ -113,7 +115,7 @@ Resources:
- "sts:AssumeRole"
Path: "/"
Policies:
- PolicyName: !Join ["-", [!Ref ClusterName, "bootstrap", "policy"]]
- PolicyName: !Join ["-", [!Ref InfrastructureName, "bootstrap", "policy"]]
PolicyDocument:
Version: "2012-10-17"
Statement:
@@ -140,7 +142,7 @@ Resources:
BootstrapSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: !Join ["-", ["bootstrap-sg", !Ref ClusterName]]
GroupName: !Join ["-", ["bootstrap-sg", !Ref InfrastructureName]]
GroupDescription: Cluster Bootstrap Security Group
SecurityGroupIngress:
- IpProtocol: tcp
@@ -174,8 +176,8 @@ Resources:
}
Tags:
- Key: "Name"
Value: !Join ["-", [!Ref ClusterName, "bootstrap"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref ClusterName]]
Value: !Join ["-", [!Ref InfrastructureName, "bootstrap"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]]
Value: "Owned"
RegisterBootstrapApiTarget:

View File

@@ -2,10 +2,12 @@ AWSTemplateFormatVersion: 2010-09-09
Description: Template for Openshift Cluster UPI Node Launch (EC2 master instances)
Parameters:
ClusterName:
InfrastructureName:
AllowedPattern: ^([a-zA-Z][a-zA-Z0-9\-]{0,31})$
ConstraintDescription: Cluster name must be alphanumeric, start with a letter and a maximum of 32 characters
Description: A short, representative cluster name to use for hostnames, etc.
MaxLength: 32
MinLength: 1
ConstraintDescription: Infrastructure name must be alphanumeric, start with a letter and a maximum of 32 characters
Description: A short, unique cluster ID used to tag cloud resources and identify items owned/used by the cluster.
Type: String
RhcosAmi:
Description: Current RHEL CoreOS AMI to use for boostrap
@@ -91,6 +93,7 @@ Metadata:
default: "Cluster Information"
Parameters:
- ClusterName
- InfrastructureName
- Label:
default: "Host Information"
Parameters:
@@ -125,6 +128,8 @@ Metadata:
ParameterLabels:
ClusterName:
default: "Cluster Name"
InfrastructureName:
default: "Infrastructure Name"
VpcId:
default: "VPC ID"
Master0Subnet:
@@ -180,11 +185,11 @@ Resources:
}
Tags:
- Key: "Name"
Value: !Join ["-", [!Ref ClusterName, "master", "0"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref ClusterName]]
Value: !Join ["-", [!Ref InfrastructureName, "master", "0"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]]
Value: "owned"
- Key: "clusterid"
Value: !Ref ClusterName
Value: !Ref InfrastructureName
RegisterMaster0:
Condition: DoRegistration
@@ -231,11 +236,11 @@ Resources:
}
Tags:
- Key: "Name"
Value: !Join ["-", [!Ref ClusterName, "master", "1"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref ClusterName]]
Value: !Join ["-", [!Ref InfrastructureName, "master", "1"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]]
Value: "owned"
- Key: "clusterid"
Value: !Ref ClusterName
Value: !Ref InfrastructureName
RegisterMaster1:
Condition: DoRegistration
@@ -282,11 +287,11 @@ Resources:
}
Tags:
- Key: "Name"
Value: !Join ["-", [!Ref ClusterName, "master", "2"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref ClusterName]]
Value: !Join ["-", [!Ref InfrastructureName, "master", "2"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]]
Value: "owned"
- Key: "clusterid"
Value: !Ref ClusterName
Value: !Ref InfrastructureName
RegisterMaster2:
Condition: DoRegistration

View File

@@ -2,10 +2,12 @@ AWSTemplateFormatVersion: 2010-09-09
Description: Template for Openshift Cluster UPI Node Launch (EC2 worker instance)
Parameters:
ClusterName:
InfrastructureName:
AllowedPattern: ^([a-zA-Z][a-zA-Z0-9\-]{0,31})$
ConstraintDescription: Cluster name must be alphanumeric, start with a letter and a maximum of 32 characters
Description: A short, representative cluster name to use for hostnames, etc.
MaxLength: 32
MinLength: 1
ConstraintDescription: Infrastructure name must be alphanumeric, start with a letter and a maximum of 32 characters
Description: A short, unique cluster ID used to tag cloud resources and identify items owned/used by the cluster.
Type: String
RhcosAmi:
Description: Current RHEL CoreOS AMI to use for boostrap
@@ -56,7 +58,7 @@ Metadata:
- Label:
default: "Cluster Information"
Parameters:
- ClusterName
- InfrastructureName
- Label:
default: "Host Information"
Parameters:
@@ -72,8 +74,8 @@ Metadata:
- VpcId
- WorkerSubnet
ParameterLabels:
ClusterName:
default: "Cluster Name"
InfrastructureName:
default: "Infrastructure Name"
VpcId:
default: "VPC ID"
WorkerSubnet:
@@ -113,8 +115,8 @@ Resources:
}
Tags:
- Key: "Name"
Value: !Join ["-", [!Ref ClusterName, "worker"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref ClusterName]]
Value: !Join ["-", [!Ref InfrastructureName, "worker"]]
- Key: !Join ["", ["kubernetes.io/cluster/", !Ref InfrastructureName]]
Value: "owned"
- Key: "clusterid"
Value: !Ref ClusterName
Value: !Ref InfrastructureName