k0sproject / k0smotron

k0smotron
https://docs.k0smotron.io/
Other
508 stars 48 forks source link

Add missing K0sControlPlane status fields and refactor status calc #774

Closed jnummelin closed 1 month ago

jnummelin commented 1 month ago

K0sControlPlane was missing some required status fields relating to replicas. https://cluster-api.sigs.k8s.io/developer/providers/control-plane?search=pause#required-status-fields-for-implementations-using-replicas

While this doesn't really break anything when using this in "standalone" fashion, e.g. without ClusterClass, things go south when using with ClusterClass. What happens is that when the CAPI topology controller does not see the expected fields, it'll determine that the CP is still scaling up and hence prevents users from upgrading CP via CC.

Previously we dropped the k0s version suffix from the Machines, in this PR we change it to always include the suffix if given in the CP version. This is to allow e.g. v1.30.0+k0s.0 --> v1.30.0+k0s.1 type upgrades.

jnummelin commented 1 month ago

Thanks @apedriza , pushed the suggested changes