mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
kubeadm: Ensure etcd manifests are regenerated upon upgrade
A check that verifies that kubeadm does not "upgrade" to an older release was overly optimized by skipping upgrade if the new version is the same as the old one. This somewhat makes sense, but that way changes in any of the etcd fields in the ClusterConfiguration won't be applied if the etcd version is not changed. Hence, this simple change ensures that the upgrade is done even when no version change takes place. Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
This commit is contained in:
parent
d159ae3545
commit
3bef5d2e0b
@ -321,8 +321,8 @@ func performEtcdStaticPodUpgrade(certsRenewMgr *renewal.Manager, client clientse
|
||||
if err != nil {
|
||||
return true, errors.Wrapf(err, "failed comparing the current etcd version %q to the desired one %q", currentEtcdVersionStr, desiredEtcdVersion)
|
||||
}
|
||||
if cmpResult < 1 {
|
||||
return false, errors.Errorf("the desired etcd version %q is not newer than the currently installed %q. Skipping etcd upgrade", desiredEtcdVersion, currentEtcdVersionStr)
|
||||
if cmpResult < 0 {
|
||||
return false, errors.Errorf("the desired etcd version %q is older than the currently installed %q. Skipping etcd upgrade", desiredEtcdVersion, currentEtcdVersionStr)
|
||||
}
|
||||
|
||||
beforeEtcdPodHash, err := waiter.WaitForStaticPodSingleHash(cfg.NodeRegistration.Name, constants.Etcd)
|
||||
|
Loading…
Reference in New Issue
Block a user