mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
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: Davanum 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 ```
This commit is contained in:
commit
d51bfcd4aa
@ -26,6 +26,11 @@ import (
|
||||
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
|
||||
func GetGenericArchImage(prefix, image, tag string) string {
|
||||
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))
|
||||
|
||||
// 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 cfg.Etcd.Local != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user