Add etcd image version to kubeadm

This commit is contained in:
Joe Betz 2019-09-04 13:48:49 -07:00
parent 100608f441
commit 5a3399f48d
2 changed files with 7 additions and 3 deletions

View File

@ -262,6 +262,10 @@ const (
// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
DefaultEtcdVersion = "3.3.15"
// DefaultEtcdImageVersion indicates the etcd image version that kubeadm uses.
// For example, the image version of "k8s.gcr.io/etcd:3.3.15-0" is "0".
DefaultEtcdImageVersion = "0"
// PauseVersion indicates the default pause image version for kubeadm
PauseVersion = "3.1"
@ -424,8 +428,8 @@ var (
13: "3.2.24",
14: "3.3.10",
15: "3.3.10",
16: "3.3.15",
17: "3.3.15",
16: "3.3.15-0",
17: "3.3.15-0",
}
// KubeadmCertsClusterRoleName sets the name for the ClusterRole that allows

View File

@ -68,7 +68,7 @@ func GetEtcdImage(cfg *kubeadmapi.ClusterConfiguration) string {
etcdImageRepository = cfg.Etcd.Local.ImageRepository
}
// Etcd uses an imageTag that corresponds to the etcd version matching the Kubernetes version
etcdImageTag := constants.DefaultEtcdVersion
etcdImageTag := fmt.Sprintf("%s-%s", constants.DefaultEtcdVersion, constants.DefaultEtcdImageVersion)
etcdVersion, err := constants.EtcdSupportedVersion(cfg.KubernetesVersion)
if err == nil {
etcdImageTag = etcdVersion.String()