mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
kubeadm: drop older etcd versions from kubeadm support
- drop versions < 1.22 in the etcd map - use 3.5.9-0 for >= 1.22 versions - make the minimum version for external etcd 3.4.13-4 and max 3.5.9-0 - update images_test to not rely on a pinned etcd version in tests note: the image 3.4.18-0 was never released in registry.k8s.io!
This commit is contained in:
parent
1ff1a26426
commit
ede2ec22b6
@ -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",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user