From ccddd4978db3177da7089fbb5dca8ac9dcffa933 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Thu, 19 May 2022 12:07:25 -0700 Subject: [PATCH] use precise versions for kubeadm label / taint changes --- pkg/cluster/internal/create/actions/kubeadminit/init.go | 4 ++-- .../internal/create/actions/waitforready/waitforready.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cluster/internal/create/actions/kubeadminit/init.go b/pkg/cluster/internal/create/actions/kubeadminit/init.go index 73326120e1..cc587940e2 100644 --- a/pkg/cluster/internal/create/actions/kubeadminit/init.go +++ b/pkg/cluster/internal/create/actions/kubeadminit/init.go @@ -122,10 +122,10 @@ func (a *action) Execute(ctx *actions.ActionContext) error { return errors.Wrap(err, "could not parse Kubernetes version") } var taints []string - if kubeVersion.LessThan(version.MustParseSemantic("v1.24.0-0")) { + if kubeVersion.LessThan(version.MustParseSemantic("v1.24.0-alpha.1.592+370031cadac624")) { // for versions older than 1.24 prerelease remove only the old taint taints = []string{"node-role.kubernetes.io/master-"} - } else if kubeVersion.LessThan(version.MustParseSemantic("v1.25.0-0")) { + } else if kubeVersion.LessThan(version.MustParseSemantic("v1.25.0-alpha.0.557+84c8afeba39ec9")) { // for versions between 1.24 and 1.25 prerelease remove both the old and new taint taints = []string{"node-role.kubernetes.io/control-plane-", "node-role.kubernetes.io/master-"} } else { diff --git a/pkg/cluster/internal/create/actions/waitforready/waitforready.go b/pkg/cluster/internal/create/actions/waitforready/waitforready.go index 59348a9059..e6c03e54cd 100644 --- a/pkg/cluster/internal/create/actions/waitforready/waitforready.go +++ b/pkg/cluster/internal/create/actions/waitforready/waitforready.go @@ -80,7 +80,7 @@ func (a *Action) Execute(ctx *actions.ActionContext) error { return errors.Wrap(err, "could not parse Kubernetes version") } selectorLabel := "node-role.kubernetes.io/control-plane" - if kubeVersion.LessThan(version.MustParseSemantic("v1.24.0")) { + if kubeVersion.LessThan(version.MustParseSemantic("v1.24.0-alpha.1.591+a3d5e5598290df")) { selectorLabel = "node-role.kubernetes.io/master" }