Merge pull request #118733 from neolit123/1.28-etcd-version-fixup

kubeadm: drop older etcd versions from kubeadm support
This commit is contained in:
Kubernetes Prow Robot 2023-06-18 23:32:21 -07:00 committed by GitHub
commit 26f7f8e980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 19 deletions

View File

@ -306,7 +306,7 @@ const (
KubeletHealthzPort = 10248 KubeletHealthzPort = 10248
// MinExternalEtcdVersion indicates minimum external etcd version which kubeadm supports // MinExternalEtcdVersion indicates minimum external etcd version which kubeadm supports
MinExternalEtcdVersion = "3.4.3-0" MinExternalEtcdVersion = "3.4.13-4"
// DefaultEtcdVersion indicates the default etcd version that kubeadm uses // DefaultEtcdVersion indicates the default etcd version that kubeadm uses
DefaultEtcdVersion = "3.5.9-0" DefaultEtcdVersion = "3.5.9-0"
@ -467,17 +467,12 @@ var (
// SupportedEtcdVersion lists officially supported etcd versions with corresponding Kubernetes releases // SupportedEtcdVersion lists officially supported etcd versions with corresponding Kubernetes releases
SupportedEtcdVersion = map[uint8]string{ SupportedEtcdVersion = map[uint8]string{
17: "3.4.3-0", 22: "3.5.9-0",
18: "3.4.3-0", 23: "3.5.9-0",
19: "3.4.18-0", 24: "3.5.9-0",
20: "3.4.18-0", 25: "3.5.9-0",
21: "3.4.18-0", 26: "3.5.9-0",
22: "3.5.8-0", 27: "3.5.9-0",
23: "3.5.8-0",
24: "3.5.8-0",
25: "3.5.8-0",
26: "3.5.8-0",
27: "3.5.8-0",
28: "3.5.9-0", 28: "3.5.9-0",
} }

View File

@ -27,8 +27,8 @@ import (
) )
const ( const (
testversion = "v10.1.2-alpha.1.100+0123456789abcdef+SOMETHING" testversion = "v10.1.2-alpha.1.100+0123456789abcdef"
expected = "v10.1.2-alpha.1.100_0123456789abcdef_SOMETHING" expected = "v10.1.2-alpha.1.100_0123456789abcdef"
gcrPrefix = "registry.k8s.io" gcrPrefix = "registry.k8s.io"
) )
@ -97,6 +97,7 @@ func TestGetKubernetesImage(t *testing.T) {
} }
func TestGetEtcdImage(t *testing.T) { func TestGetEtcdImage(t *testing.T) {
testEtcdVer, _, _ := constants.EtcdSupportedVersion(constants.SupportedEtcdVersion, testversion)
var tests = []struct { var tests = []struct {
expected string expected string
cfg *kubeadmapi.ClusterConfiguration cfg *kubeadmapi.ClusterConfiguration
@ -104,17 +105,17 @@ func TestGetEtcdImage(t *testing.T) {
{ {
cfg: &kubeadmapi.ClusterConfiguration{ cfg: &kubeadmapi.ClusterConfiguration{
ImageRepository: "real.repo", ImageRepository: "real.repo",
KubernetesVersion: "1.18.0", KubernetesVersion: testversion,
Etcd: kubeadmapi.Etcd{ Etcd: kubeadmapi.Etcd{
Local: &kubeadmapi.LocalEtcd{}, Local: &kubeadmapi.LocalEtcd{},
}, },
}, },
expected: "real.repo/etcd:3.4.3-0", expected: "real.repo/etcd:" + testEtcdVer.String(),
}, },
{ {
cfg: &kubeadmapi.ClusterConfiguration{ cfg: &kubeadmapi.ClusterConfiguration{
ImageRepository: "real.repo", ImageRepository: "real.repo",
KubernetesVersion: "1.18.0", KubernetesVersion: testversion,
Etcd: kubeadmapi.Etcd{ Etcd: kubeadmapi.Etcd{
Local: &kubeadmapi.LocalEtcd{ Local: &kubeadmapi.LocalEtcd{
ImageMeta: kubeadmapi.ImageMeta{ ImageMeta: kubeadmapi.ImageMeta{
@ -128,7 +129,7 @@ func TestGetEtcdImage(t *testing.T) {
{ {
cfg: &kubeadmapi.ClusterConfiguration{ cfg: &kubeadmapi.ClusterConfiguration{
ImageRepository: "real.repo", ImageRepository: "real.repo",
KubernetesVersion: "1.18.0", KubernetesVersion: testversion,
Etcd: kubeadmapi.Etcd{ Etcd: kubeadmapi.Etcd{
Local: &kubeadmapi.LocalEtcd{ Local: &kubeadmapi.LocalEtcd{
ImageMeta: kubeadmapi.ImageMeta{ ImageMeta: kubeadmapi.ImageMeta{
@ -137,7 +138,7 @@ func TestGetEtcdImage(t *testing.T) {
}, },
}, },
}, },
expected: "override/etcd:3.4.3-0", expected: "override/etcd:" + testEtcdVer.String(),
}, },
{ {
expected: GetGenericImage(gcrPrefix, "etcd", constants.DefaultEtcdVersion), expected: GetGenericImage(gcrPrefix, "etcd", constants.DefaultEtcdVersion),