diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index c93f553fd89..35dd4455426 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -317,7 +317,7 @@ const ( KubeletHealthzPort = 10248 // MinExternalEtcdVersion indicates minimum external etcd version which kubeadm supports - MinExternalEtcdVersion = "3.4.13-4" + MinExternalEtcdVersion = "3.5.11-0" // DefaultEtcdVersion indicates the default etcd version that kubeadm uses DefaultEtcdVersion = "3.5.13-0" @@ -479,13 +479,6 @@ var ( // SupportedEtcdVersion lists officially supported etcd versions with corresponding Kubernetes releases SupportedEtcdVersion = map[uint8]string{ - 22: "3.5.13-0", - 23: "3.5.13-0", - 24: "3.5.13-0", - 25: "3.5.13-0", - 26: "3.5.13-0", - 27: "3.5.13-0", - 28: "3.5.13-0", 29: "3.5.13-0", 30: "3.5.13-0", 31: "3.5.13-0", diff --git a/cmd/kubeadm/app/constants/constants_test.go b/cmd/kubeadm/app/constants/constants_test.go index bc33346a8d2..7ac9e271fba 100644 --- a/cmd/kubeadm/app/constants/constants_test.go +++ b/cmd/kubeadm/app/constants/constants_test.go @@ -124,11 +124,15 @@ func TestGetStaticPodFilepath(t *testing.T) { } } +func TestEtcdSupportedVersionLength(t *testing.T) { + const max = 3 + if len(SupportedEtcdVersion) > max { + t.Fatalf("SupportedEtcdVersion must not include more than %d versions", max) + } +} + func TestEtcdSupportedVersion(t *testing.T) { var supportedEtcdVersion = map[uint8]string{ - 13: "3.2.24", - 14: "3.3.10", - 15: "3.3.10", 16: "3.3.17-0", 17: "3.4.3-0", 18: "3.4.3-0", @@ -147,7 +151,7 @@ func TestEtcdSupportedVersion(t *testing.T) { }, { kubernetesVersion: "1.10.1", - expectedVersion: version.MustParseSemantic("3.2.24"), + expectedVersion: version.MustParseSemantic("3.3.17-0"), expectedWarning: true, expectedError: false, },