Skip to content

Commit 438ff15

Browse files
committed
cluster: configure: load images and add tags with no arch
1 parent 416a717 commit 438ff15

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cluster/gce/gci/configure.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,15 @@ function load-docker-images {
381381
else
382382
try-load-docker-image "${img_dir}/kube-proxy.tar"
383383
fi
384+
# When we load from a docker archive, the image is tagged with the arch, we don't have docker manifests here.
385+
# The resource manifest is expecting something like 'registry/kube-controller-manager:v1.2.3', no arch specified.
386+
local -r images=$(docker images --format "{{.Repository}}:{{.Tag}}" | egrep 'kube-apiserver|kube-controller-manager|kube-scheduler|kube-proxy' | grep amd64)
387+
for image in $images ; do
388+
local -r manifest_name="${image/-amd64/}"
389+
if ! docker images --format "{{.Repository}}:{{.Tag}}" | grep -q ${manifest_name} ; then
390+
docker tag $image $manifest_name
391+
fi
392+
done
384393
}
385394

386395
# Downloads kubernetes binaries and kube-system manifest tarball, unpacks them,

0 commit comments

Comments
 (0)