Skip to content

Commit 3894a11

Browse files
author
William Lam
committed
Need to pull KIND image
1 parent 74bf202 commit 3894a11

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

shell/mirror_tkg_containers.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if [ ! -e ${TKG_CLI_PATH} ]; then
1010
fi
1111

1212
LIST=(
13+
registry.tkg.vmware.run/kind/node:v1.17.3_vmware.2
1314
registry.tkg.vmware.run/cluster-api/cluster-api-aws-controller:v0.5.2_vmware.1
1415
registry.tkg.vmware.run/cluster-api/kubeadm-control-plane-controller:v0.3.3_vmware.1
1516
registry.tkg.vmware.run/cluster-api/kubeadm-bootstrap-controller:v0.3.3_vmware.1
@@ -46,10 +47,14 @@ do
4647
imageDestination=$(echo -n "$image" | sed "s/$origImageRepo/$newImageRepo/g")
4748
echo "> Pulling $image"
4849
docker pull "$image"
49-
echo "> Pushing $imageDestination"
50-
docker tag "$image" "$imageDestination"
51-
docker push "$imageDestination"
52-
docker rmi "$image"
50+
# Do not push KIND container into Harbor as this is only used locally
51+
if [ "$image" != "registry.tkg.vmware.run/kind/node:v1.17.3_vmware.2" ]; then
52+
echo "> Tagging $image -> $imageDestination"
53+
docker tag "$image" "$imageDestination"
54+
echo "> Pushing $imageDestination"
55+
docker push "$imageDestination"
56+
docker rmi "$image"
57+
fi
5358
# Leaving these containers cached in Photon to speed up KIND deployment
5459
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
5560
docker rmi "$imageDestination"

0 commit comments

Comments
 (0)