Allow customize registry name of base and release images

default behavior does not change, it uses k8s.gcr.io by default
added two vars: KUBE_DOCKER_REGISTRY, KUBE_BASE_IMAGE_REGISTRY.
KUBE_BASE_IMAGE_REGISTRY is for base image registry of server binaries
KUBE_DOCKER_REGISTRY is for released images registry

user can interact with them by:
`KUBE_DOCKER_REGISTRY=### KUBE_BASE_IMAGE_REGISTRY=### make quick-release`

Signed-off-by: Hui Luo <luoh@vmware.com>
This commit is contained in:
hui luo
2019-07-24 06:37:02 -07:00
parent 030274eba3
commit 97087c66f7
3 changed files with 11 additions and 6 deletions

View File

@@ -337,7 +337,7 @@ function kube::release::create_docker_images_for_server() {
local images_dir="${RELEASE_IMAGES}/${arch}"
mkdir -p "${images_dir}"
local -r docker_registry="k8s.gcr.io"
local -r docker_registry="${KUBE_DOCKER_REGISTRY}"
# Docker tags cannot contain '+'
local docker_tag="${KUBE_GIT_VERSION/+/_}"
if [[ -z "${docker_tag}" ]]; then