Skip to content

Commit

Permalink
Merge pull request #2779 from BenTheElder/precision-versions
Browse files Browse the repository at this point in the history
use precise versions for kubeadm label / taint changes
  • Loading branch information
BenTheElder authored May 19, 2022
2 parents 1e2f525 + ccddd49 commit b975bbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/internal/create/actions/kubeadminit/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down

0 comments on commit b975bbb

Please sign in to comment.