mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-23 19:16:25 +00:00
For historic reasons kubeadm kept track of a skew of 2+ etcd version in a map in the constants.go file. This is really not required because kubeadm supports only 2 version of etcd mapped to two Kubernetes versions, which are essentially the control plane versions. Refactor the constants.go map to only include 2 versions. Make sure that's reflected in a unit test. Instead of pinning the versions as literal numbers, start using the version we get on build time. Adapt various unit tests and functions to allow this change to work, since during unit tests we need actual values and the build versions are not populated. This is achieved by requiring the functions to accept a map[uint8]string used for testing.