pause image should be arch agnostic

Change-Id: I4997ace30077335767bca402a8b98202c91b950b
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2018-07-06 15:18:43 -04:00
parent 54db2273eb
commit a6f86c6778
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59

View File

@ -26,6 +26,11 @@ import (
kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util"
) )
// GetGenericImage generates and returns a platform agnostic image (backed by manifest list)
func GetGenericImage(prefix, image, tag string) string {
return fmt.Sprintf("%s/%s:%s", prefix, image, tag)
}
// GetGenericArchImage generates and returns an image based on the current runtime arch // GetGenericArchImage generates and returns an image based on the current runtime arch
func GetGenericArchImage(prefix, image, tag string) string { func GetGenericArchImage(prefix, image, tag string) string {
return fmt.Sprintf("%s/%s-%s:%s", prefix, image, runtime.GOARCH, tag) return fmt.Sprintf("%s/%s-%s:%s", prefix, image, runtime.GOARCH, tag)
@ -68,7 +73,7 @@ func GetAllImages(cfg *kubeadmapi.MasterConfiguration) []string {
imgs = append(imgs, GetKubeControlPlaneImageNoOverride(constants.KubeProxy, cfg)) imgs = append(imgs, GetKubeControlPlaneImageNoOverride(constants.KubeProxy, cfg))
// pause, etcd and kube-dns are not available on the ci image repository so use the default image repository. // pause, etcd and kube-dns are not available on the ci image repository so use the default image repository.
imgs = append(imgs, GetGenericArchImage(cfg.ImageRepository, "pause", "3.1")) imgs = append(imgs, GetGenericImage(cfg.ImageRepository, "pause", "3.1"))
// if etcd is not external then add the image as it will be required // if etcd is not external then add the image as it will be required
if cfg.Etcd.Local != nil { if cfg.Etcd.Local != nil {