From aabf78559d0b01858d25ab8bf6b934cfbab58837 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Sat, 17 Dec 2016 21:44:31 -0500 Subject: [PATCH] Don't name bastion groups 'bastions.bastion...' --- pkg/model/names.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/model/names.go b/pkg/model/names.go index 10d753eec7a89..51d9ce2f9f756 100644 --- a/pkg/model/names.go +++ b/pkg/model/names.go @@ -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)