Skip to content

Commit 4c2b073

Browse files
committed
Simplify etcd image version usage in kubeadm
1 parent 5a3399f commit 4c2b073

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

cmd/kubeadm/app/constants/constants.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,7 @@ const (
260260
MinExternalEtcdVersion = "3.2.18"
261261

262262
// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
263-
DefaultEtcdVersion = "3.3.15"
264-
265-
// DefaultEtcdImageVersion indicates the etcd image version that kubeadm uses.
266-
// For example, the image version of "k8s.gcr.io/etcd:3.3.15-0" is "0".
267-
DefaultEtcdImageVersion = "0"
263+
DefaultEtcdVersion = "3.3.15-0"
268264

269265
// PauseVersion indicates the default pause image version for kubeadm
270266
PauseVersion = "3.1"

cmd/kubeadm/app/images/images.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func GetEtcdImage(cfg *kubeadmapi.ClusterConfiguration) string {
6868
etcdImageRepository = cfg.Etcd.Local.ImageRepository
6969
}
7070
// Etcd uses an imageTag that corresponds to the etcd version matching the Kubernetes version
71-
etcdImageTag := fmt.Sprintf("%s-%s", constants.DefaultEtcdVersion, constants.DefaultEtcdImageVersion)
71+
etcdImageTag := constants.DefaultEtcdVersion
7272
etcdVersion, err := constants.EtcdSupportedVersion(cfg.KubernetesVersion)
7373
if err == nil {
7474
etcdImageTag = etcdVersion.String()

0 commit comments

Comments
 (0)