From 401f3f824c242c4b8a8efead479c7e3cf30e6cf4 Mon Sep 17 00:00:00 2001 From: Carlisia Date: Sun, 23 Sep 2018 13:41:58 -0700 Subject: [PATCH] Change pause version value to a constant for image Closes #1137 --- cmd/kubeadm/app/constants/constants.go | 3 +++ cmd/kubeadm/app/images/images.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index 86ac6cdecfc..dbf163b46e7 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -246,6 +246,9 @@ const ( // DefaultEtcdVersion indicates the default etcd version that kubeadm uses DefaultEtcdVersion = "3.2.24" + // PauseVersion indicates the default pause image version for kubeadm + PauseVersion = "3.1" + // Etcd defines variable used internally when referring to etcd component Etcd = "etcd" // KubeAPIServer defines variable used internally when referring to kube-apiserver component diff --git a/cmd/kubeadm/app/images/images.go b/cmd/kubeadm/app/images/images.go index ed73c772c0d..3d520cb3cee 100644 --- a/cmd/kubeadm/app/images/images.go +++ b/cmd/kubeadm/app/images/images.go @@ -62,7 +62,7 @@ func GetAllImages(cfg *kubeadmapi.ClusterConfiguration) []string { imgs = append(imgs, GetKubeControlPlaneImage(constants.KubeProxy, cfg)) // pause, etcd and kube-dns are not available on the ci image repository so use the default image repository. - imgs = append(imgs, GetGenericImage(cfg.ImageRepository, "pause", "3.1")) + imgs = append(imgs, GetGenericImage(cfg.ImageRepository, "pause", constants.PauseVersion)) // if etcd is not external then add the image as it will be required if cfg.Etcd.Local != nil {