From fcc335c880b115c8fd5f97b9251d29451d07367d Mon Sep 17 00:00:00 2001 From: Di Xu Date: Wed, 16 May 2018 21:49:17 +0800 Subject: [PATCH] Remove v190alpha3 --- cmd/kubeadm/app/phases/upgrade/postupgrade.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/kubeadm/app/phases/upgrade/postupgrade.go b/cmd/kubeadm/app/phases/upgrade/postupgrade.go index ec0a9bc10aa..1b34e3e6a2a 100644 --- a/cmd/kubeadm/app/phases/upgrade/postupgrade.go +++ b/cmd/kubeadm/app/phases/upgrade/postupgrade.go @@ -43,7 +43,6 @@ import ( "k8s.io/kubernetes/pkg/util/version" ) -var v190alpha3 = version.MustParseSemantic("v1.9.0-alpha.3") var expiry = 180 * 24 * time.Hour // PerformPostUpgradeTasks runs nearly the same functions as 'kubeadm init' would do @@ -74,7 +73,7 @@ func PerformPostUpgradeTasks(client clientset.Interface, cfg *kubeadmapi.MasterC } // Upgrade to a self-hosted control plane if possible - if err := upgradeToSelfHosting(client, cfg, newK8sVer, dryRun); err != nil { + if err := upgradeToSelfHosting(client, cfg, dryRun); err != nil { errs = append(errs, err) } @@ -144,8 +143,8 @@ func removeOldDNSDeploymentIfAnotherDNSIsUsed(cfg *kubeadmapi.MasterConfiguratio }, 10) } -func upgradeToSelfHosting(client clientset.Interface, cfg *kubeadmapi.MasterConfiguration, newK8sVer *version.Version, dryRun bool) error { - if features.Enabled(cfg.FeatureGates, features.SelfHosting) && !IsControlPlaneSelfHosted(client) && newK8sVer.AtLeast(v190alpha3) { +func upgradeToSelfHosting(client clientset.Interface, cfg *kubeadmapi.MasterConfiguration, dryRun bool) error { + if features.Enabled(cfg.FeatureGates, features.SelfHosting) && !IsControlPlaneSelfHosted(client) { waiter := getWaiter(dryRun, client)