kubernetes-sigs / kubernetes-sigs/cluster-api

Comparing Machine and kubelet versions as raw strings prevents worker Machines upgrade

Open
#14,086 8 comments 0 reactions 0 assignees View on GitHub
kind/bug needs-priority needs-triage
Dominant language
Go
Stars
4.3k
Forks
1.6k
Avg merge
1d 3h
Merged PRs (30d)
113

Description

### What steps did you take and what happened?

Upgrading worker nodes using cluster.topology.version cannot be done as the admision webhook reject the operation due to a [recent check added ](https://github.com/kubernetes-sigs/cluster-api/pull/13876)for in-place updates. There are Kubernetes distributions like k0s builds kubelet with build metadata that differs from the build metadata in Machine.spec.version (e.g. kubelet reports v1.33.1+k0s while spec.version is v1.33.1+k0s.0), so when CAPI admission webhook compares Node.status.nodeInfo.kubeletVersion against the desired version in the Machine as raw strings it does not match

### What did you expect to happen?

I expect to compare without taking into account buildmetadata from kubelet and machine version, following semver spec

### Cluster API version

v1.14.0

### Kubernetes version

_No response_

### Anything else you would like to add?

fixed in https://github.com/kubernetes-sigs/cluster-api/pull/13973

### Label(s) to be applied

/kind bug
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

Contributor guide

Open the contributing guide

Research direction

Start at the admission webhook version check described in the issue and review PR #13973, which the report identifies as the fix. Verify how the webhook compares Machine.spec.version with Node.status.nodeInfo.kubeletVersion, then confirm that worker upgrades succeed when only build metadata differs while following semver comparison.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.