Skip to content

Commit

Permalink
Don't name bastion groups 'bastions.bastion...'
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Dec 18, 2016
1 parent 4b83005 commit aabf785
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/model/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit aabf785

Please sign in to comment.