k0sproject / k0sproject/k0sctl

upgrades are done regardless of running version or --disable-upgrade-check set

Open
#509 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
582
Forks
113
Avg merge
2d 13h
Merged PRs (30d)
34

Description

k0sctl upgrades cluster even if it runs the same version as the desired version, steps to reproduce:

Install Cluster using some older Version (1.27.0), do modify k0sctl config file to set desired Version to 1.27.2, run
`k0sctl apply --config `
Now Cluster is on 1.27.2 - so far so good

now run
`k0sctl apply --config `
again, with the same k0s configfile set to 1.27.2 as the targetversion, k0sctl will upgrade 1.27.2 over 1.27.2 ?!

`k0sctl apply --config --disable-upgrade-check `
--> will also do the upgrade

Console out:
```
(...)
INFO [ssh] <###ip###>:22: is running k0s controller version 1.27.2+k0s.0
WARN [ssh] <###ip###>:22: k0s will be upgraded
(...)

```

Config file:
```
(...)
apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
name: <### name-redacted ###>
spec:
hosts:
- ssh:
address: <### ip-redacted ###>
user: ${USER}
port: 22
keyPath: ~/.ssh/id_ed25519
role: controller
privateAddress: <### ip-redacted ###>
uploadBinary: true
k0sBinaryPath: <### path redacted ###>/k0s-v1.27.2+k0s.0-amd64
installFlags:
- --kubelet-extra-args='--config=<### path redacted ###>.yaml'
(...)
- ssh:
address: <### ip-redacted ###>
user: ${USER}
port: 22
keyPath: ~/.ssh/id_ed25519
role: worker
privateAddress: <### ip-redacted ###>
uploadBinary: true
k0sBinaryPath: <### path redacted ###>/k0s-v1.27.2+k0s.0-amd64
installFlags:
- --kubelet-extra-args='--config=<### path redacted ###>.yaml'

k0s:
version: v1.27.2+k0s.0
dynamicConfig: false
config:
apiVersion: k0s.k0sproject.io/v1beta1
kind: ClusterConfig
metadata:
name: <### name ###>
spec:
api:
externalAddress: <### ip ###>
(...)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the k0sctl apply command path, reproducing the two apply commands against a cluster already at the desired version. Trace the upgrade decision and --disable-upgrade-check handling; done means an equal running and target version causes no upgrade, including when the flag is set.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.