Don't name bastion groups 'bastions.bastion...'

This commit is contained in:
Justin Santa Barbara 2016-12-17 21:44:31 -05:00
parent 1ef2c367c1
commit 125b9badd8
1 changed files with 5 additions and 4 deletions

View File

@ -47,12 +47,13 @@ func (b *KopsModelContext) LinkToSecurityGroup(role kops.InstanceGroupRole) *aws
func (b *KopsModelContext) AutoscalingGroupName(ig *kops.InstanceGroup) string {
switch ig.Spec.Role {
case kops.InstanceGroupRoleNode:
return ig.ObjectMeta.Name + "." + b.ClusterName()
case kops.InstanceGroupRoleMaster:
// We need to keep this back-compatible, so we introduce the masters name,
// though the IG name suffices for uniqueness, and with sensible naming masters
// should be redundant...
return ig.ObjectMeta.Name + ".masters." + b.ClusterName()
case kops.InstanceGroupRoleBastion:
return ig.ObjectMeta.Name + ".bastions." + b.ClusterName()
case kops.InstanceGroupRoleNode, kops.InstanceGroupRoleBastion:
return ig.ObjectMeta.Name + "." + b.ClusterName()
default:
glog.Fatalf("unknown InstanceGroup Role: %v", ig.Spec.Role)