Skip to content

Commit 5a3399f

Browse files
committed
Add etcd image version to kubeadm
1 parent 100608f commit 5a3399f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cmd/kubeadm/app/constants/constants.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ const (
262262
// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
263263
DefaultEtcdVersion = "3.3.15"
264264

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"
268+
265269
// PauseVersion indicates the default pause image version for kubeadm
266270
PauseVersion = "3.1"
267271

@@ -424,8 +428,8 @@ var (
424428
13: "3.2.24",
425429
14: "3.3.10",
426430
15: "3.3.10",
427-
16: "3.3.15",
428-
17: "3.3.15",
431+
16: "3.3.15-0",
432+
17: "3.3.15-0",
429433
}
430434

431435
// KubeadmCertsClusterRoleName sets the name for the ClusterRole that allows

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

0 commit comments

Comments
 (0)