cluster: configure: load images and add tags with no arch

This commit is contained in:
Javier Pérez Hernández 2019-07-11 12:17:42 -07:00
parent 416a717eff
commit 438ff151d4

View File

@ -381,6 +381,15 @@ function load-docker-images {
else
try-load-docker-image "${img_dir}/kube-proxy.tar"
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,