Skip to content

Commit

Permalink
Need to pull KIND image
Browse files Browse the repository at this point in the history
  • Loading branch information
William Lam committed Apr 23, 2020
1 parent 74bf202 commit 3894a11
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions shell/mirror_tkg_containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if [ ! -e ${TKG_CLI_PATH} ]; then
fi

LIST=(
registry.tkg.vmware.run/kind/node:v1.17.3_vmware.2
registry.tkg.vmware.run/cluster-api/cluster-api-aws-controller:v0.5.2_vmware.1
registry.tkg.vmware.run/cluster-api/kubeadm-control-plane-controller:v0.3.3_vmware.1
registry.tkg.vmware.run/cluster-api/kubeadm-bootstrap-controller:v0.3.3_vmware.1
Expand Down Expand Up @@ -46,10 +47,14 @@ do
imageDestination=$(echo -n "$image" | sed "s/$origImageRepo/$newImageRepo/g")
echo "> Pulling $image"
docker pull "$image"
echo "> Pushing $imageDestination"
docker tag "$image" "$imageDestination"
docker push "$imageDestination"
docker rmi "$image"
# Do not push KIND container into Harbor as this is only used locally
if [ "$image" != "registry.tkg.vmware.run/kind/node:v1.17.3_vmware.2" ]; then
echo "> Tagging $image -> $imageDestination"
docker tag "$image" "$imageDestination"
echo "> Pushing $imageDestination"
docker push "$imageDestination"
docker rmi "$image"
fi
# Leaving these containers cached in Photon to speed up KIND deployment
if [[ "$imageDestination" != "${REGISTRY_URL}/library/cert-manager/cert-manager-webhook:v0.11.0_vmware.1" ]] && [[ "$imageDestination" != "${REGISTRY_URL}/library/cert-manager/cert-manager-cainjector:v0.11.0_vmware.1" ]] && [[ "$imageDestination" != "${REGISTRY_URL}/library/cert-manager/cert-manager-controller:v0.11.0_vmware.1" ]]; then
docker rmi "$imageDestination"
Expand Down

0 comments on commit 3894a11

Please sign in to comment.