Merge pull request #80054 from javier-b-perez/load-image

cluster: configure: load images and add tags with no arch
This commit is contained in:
Kubernetes Prow Robot 2019-07-13 15:37:03 -07:00 committed by GitHub
commit b9615d5bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,6 +381,15 @@ function load-docker-images {
else else
try-load-docker-image "${img_dir}/kube-proxy.tar" try-load-docker-image "${img_dir}/kube-proxy.tar"
fi fi
# When we load from a docker archive, the image is tagged with the arch, we don't have docker manifests here.
# The resource manifest is expecting something like 'registry/kube-controller-manager:v1.2.3', no arch specified.
local -r images=$(docker images --format "{{.Repository}}:{{.Tag}}" | egrep 'kube-apiserver|kube-controller-manager|kube-scheduler|kube-proxy' | grep amd64)
for image in $images ; do
local -r manifest_name="${image/-amd64/}"
if ! docker images --format "{{.Repository}}:{{.Tag}}" | grep -q ${manifest_name} ; then
docker tag $image $manifest_name
fi
done
} }
# Downloads kubernetes binaries and kube-system manifest tarball, unpacks them, # Downloads kubernetes binaries and kube-system manifest tarball, unpacks them,