From 9d51dff3d1b6adec163939ced1f60eae62fad352 Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Wed, 3 Oct 2018 11:06:17 -0600 Subject: [PATCH] Fix accidentally shadowed variable in upgrade cluster. (#3943) --- pkg/operations/kubernetesupgrade/upgradecluster.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/operations/kubernetesupgrade/upgradecluster.go b/pkg/operations/kubernetesupgrade/upgradecluster.go index 678625541..e2e5657a3 100644 --- a/pkg/operations/kubernetesupgrade/upgradecluster.go +++ b/pkg/operations/kubernetesupgrade/upgradecluster.go @@ -117,8 +117,9 @@ 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."): - upgrader := &Upgrader{} - upgrader.Init(uc.Translator, uc.Logger, uc.ClusterTopology, uc.Client, kubeConfig, uc.StepTimeout, acsengineVersion) + u := &Upgrader{} + u.Init(uc.Translator, uc.Logger, uc.ClusterTopology, uc.Client, kubeConfig, uc.StepTimeout, acsengineVersion) + upgrader = u default: return uc.Translator.Errorf("Upgrade to Kubernetes version %s is not supported", upgradeVersion)