Skip to content

Commit

Permalink
Allow replacement of address prefixes for all images (kubernetes-sigs…
Browse files Browse the repository at this point in the history
…#8764)

Signed-off-by: bo.jiang <[email protected]>
  • Loading branch information
ErikJiang authored and LuckySB committed Jun 30, 2023
1 parent 37ee69a commit 3f05a1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion contrib/offline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ This script has two features:
(2) Deploy local container registry and register the container images to the registry.

Step(1) should be done online site as a preparation, then we bring the gotten images
to the target offline environment.
to the target offline environment. if images are from a private registry,
you need to set `PRIVATE_REGISTRY` environment variable.
Then we will run step(2) for registering the images to local registry.

Step(1) can be operated with:
Expand Down
6 changes: 4 additions & 2 deletions contrib/offline/manage-offline-container-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ function create_container_image_tar() {
if [ "${FIRST_PART}" = "k8s.gcr.io" ] ||
[ "${FIRST_PART}" = "gcr.io" ] ||
[ "${FIRST_PART}" = "docker.io" ] ||
[ "${FIRST_PART}" = "quay.io" ]; then
[ "${FIRST_PART}" = "quay.io" ] ||
[ "${FIRST_PART}" = "${PRIVATE_REGISTRY}" ]; then
image=$(echo ${image} | sed s@"${FIRST_PART}/"@@)
fi
echo "${FILE_NAME} ${image}" >> ${IMAGE_LIST}
Expand Down Expand Up @@ -152,7 +153,8 @@ else
echo "(2) Deploy local container registry and register the container images to the registry."
echo ""
echo "Step(1) should be done online site as a preparation, then we bring"
echo "the gotten images to the target offline environment."
echo "the gotten images to the target offline environment. if images are from"
echo "a private registry, you need to set PRIVATE_REGISTRY environment variable."
echo "Then we will run step(2) for registering the images to local registry."
echo ""
echo "${IMAGE_TAR_FILE} is created to contain your container images."
Expand Down

0 comments on commit 3f05a1e

Please sign in to comment.