Files
kubernetes/cmd
Lubomir I. Ivanov 05c4e3febe kubeadm: revert to using a static list of etcd versions
The introduction of dynamic keys in the etcd version
map in constants.go introduced a couple of problems:

1. The size of the map could no longer be unit tested
because at UT runtime there was only one key "0".

2. Once a new k8s release branch is cut the version map
has mismatched versions. The latest k8s version mapped to the
future prerelease alpha (placeholder), the previous was the current
WIP release version and the oldest version in the map is the
current stable. This introduces a undesider shift of versions
where we are applying the wrong version to the current WIP
release unless an contrubutor PRs it.

The old static approach on the other hand is safer because
it hardcodes the versions, and the utility function
EtcdSupportedVersion() ensures that we get a relevant etcd
version even if the input k8s MINOR key is out of bonds for the map.

- Revert to using static version in the map.
- Revert the unit test TestEtcdSupportedVersionLength.
- Add additional comments over the map.
2025-12-08 13:40:11 +01:00
..