Unverified Commit d51bfcd4 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #65920 from dims/pause-image-should-be-arch-agnostic

Automatic merge from submit-queue (batch tested with PRs 65946, 65904, 65913, 65906, 65920). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. kubeadm: pause image should be arch agnostic, as it is a manifest list Signed-off-by: 's avatarDavanum Srinivas <davanum@gmail.com> **What this PR does / why we need it**: `pause` image is backed by a manifest list. so we should not use the arch image when reporting using say `kubeadm config image list` **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes https://github.com/kubernetes/kubeadm/issues/962 **Special notes for your reviewer**: **Release note**: ```release-note kubeadm: Fix pause image to not use architecture, as it is a manifest list ```
parents 5b052de4 a6f86c67
...@@ -26,6 +26,11 @@ import ( ...@@ -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 { ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment