Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Simplify upgrader clause.
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma committed Oct 3, 2018
1 parent 7e9869a commit 5072536
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/operations/kubernetesupgrade/upgradecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,12 @@ func (uc *UpgradeCluster) UpgradeCluster(subscriptionID uuid.UUID, kubeConfig, r

case strings.HasPrefix(upgradeVersion, "1.9."),
strings.HasPrefix(upgradeVersion, "1.10."),
strings.HasPrefix(upgradeVersion, "1.11."):
strings.HasPrefix(upgradeVersion, "1.11."),
strings.HasPrefix(upgradeVersion, "1.12."):
u := &Upgrader{}
u.Init(uc.Translator, uc.Logger, uc.ClusterTopology, uc.Client, kubeConfig, uc.StepTimeout, acsengineVersion)
upgrader = u

case strings.HasPrefix(upgradeVersion, "1.12."):
upgrader112 := &Upgrader{}
upgrader112.Init(uc.Translator, uc.Logger, uc.ClusterTopology, uc.Client, kubeConfig, uc.StepTimeout, acsengineVersion)
upgrader = upgrader112

default:
return uc.Translator.Errorf("Upgrade to Kubernetes version %s is not supported", upgradeVersion)
}
Expand Down

0 comments on commit 5072536

Please sign in to comment.