Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 8a16f84

Browse files
committed
Make use of type constants and compare type not name
Signed-off-by: JoshVanL <[email protected]>
1 parent 97d3972 commit 8a16f84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/tarmak/provider/amazon/amazon.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ func (a *Amazon) VerifyInstanceTypes(instancePools []interfaces.InstancePool) er
546546
result = multierror.Append(result, err)
547547
}
548548

549-
switch instance.Name() {
549+
switch instance.InstanceType() {
550550

551-
case "master":
551+
case clusterv1alpha1.InstancePoolTypeMaster:
552552
found := false
553553
for _, s := range a.nonMasterType() {
554554
if s == instanceType {
@@ -562,7 +562,7 @@ func (a *Amazon) VerifyInstanceTypes(instancePools []interfaces.InstancePool) er
562562
}
563563
break
564564

565-
case "etcd", "vault":
565+
case clusterv1alpha1.InstancePoolTypeEtcd, clusterv1alpha1.InstancePoolTypeVault:
566566
if a.awsInstanceBurstable(instanceType) {
567567
a.tarmak.Log().Warnf("Burstable type '%s' is not advised for instance '%s'", instanceType, instance.Name())
568568
}

0 commit comments

Comments
 (0)