Simplify etcd image version usage in kubeadm

This commit is contained in:
Joe Betz 2019-09-04 15:37:14 -07:00
parent 5a3399f48d
commit 4c2b0731cb
2 changed files with 2 additions and 6 deletions

View File

@ -260,11 +260,7 @@ const (
MinExternalEtcdVersion = "3.2.18"
// 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"
DefaultEtcdVersion = "3.3.15-0"
// PauseVersion indicates the default pause image version for kubeadm
PauseVersion = "3.1"

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 := fmt.Sprintf("%s-%s", constants.DefaultEtcdVersion, constants.DefaultEtcdImageVersion)
etcdImageTag := constants.DefaultEtcdVersion
etcdVersion, err := constants.EtcdSupportedVersion(cfg.KubernetesVersion)
if err == nil {
etcdImageTag = etcdVersion.String()