mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
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.