mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
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:
parent
030274eba3
commit
97087c66f7
@ -40,6 +40,9 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
readonly KUBE_BUILD_IMAGE_REPO=kube-build
|
||||
readonly KUBE_BUILD_IMAGE_CROSS_TAG="$(cat "${KUBE_ROOT}/build/build-image/cross/VERSION")"
|
||||
|
||||
readonly KUBE_DOCKER_REGISTRY="${KUBE_DOCKER_REGISTRY:-k8s.gcr.io}"
|
||||
readonly KUBE_BASE_IMAGE_REGISTRY="${KUBE_BASE_IMAGE_REGISTRY:-k8s.gcr.io}"
|
||||
|
||||
# This version number is used to cause everyone to rebuild their data containers
|
||||
# and build image. This is especially useful for automated build systems like
|
||||
# Jenkins.
|
||||
@ -94,11 +97,11 @@ kube::build::get_docker_wrapped_binaries() {
|
||||
### If you change any of these lists, please also update DOCKERIZED_BINARIES
|
||||
### in build/BUILD. And kube::golang::server_image_targets
|
||||
local targets=(
|
||||
cloud-controller-manager,"k8s.gcr.io/debian-base-${arch}:${debian_base_version}"
|
||||
kube-apiserver,"k8s.gcr.io/debian-base-${arch}:${debian_base_version}"
|
||||
kube-controller-manager,"k8s.gcr.io/debian-base-${arch}:${debian_base_version}"
|
||||
kube-scheduler,"k8s.gcr.io/debian-base-${arch}:${debian_base_version}"
|
||||
kube-proxy,"k8s.gcr.io/debian-iptables-${arch}:${debian_iptables_version}"
|
||||
cloud-controller-manager,"${KUBE_BASE_IMAGE_REGISTRY}/debian-base-${arch}:${debian_base_version}"
|
||||
kube-apiserver,"${KUBE_BASE_IMAGE_REGISTRY}/debian-base-${arch}:${debian_base_version}"
|
||||
kube-controller-manager,"${KUBE_BASE_IMAGE_REGISTRY}/debian-base-${arch}:${debian_base_version}"
|
||||
kube-scheduler,"${KUBE_BASE_IMAGE_REGISTRY}/debian-base-${arch}:${debian_base_version}"
|
||||
kube-proxy,"${KUBE_BASE_IMAGE_REGISTRY}/debian-iptables-${arch}:${debian_iptables_version}"
|
||||
)
|
||||
|
||||
echo "${targets[@]}"
|
||||
|
@ -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
|
||||
|
@ -445,6 +445,8 @@ define RELEASE_SKIP_TESTS_HELP_INFO
|
||||
# Args:
|
||||
# KUBE_RELEASE_RUN_TESTS: Whether to run tests. Set to 'y' to run tests anyways.
|
||||
# KUBE_FASTBUILD: Whether to cross-compile for other architectures. Set to 'false' to do so.
|
||||
# KUBE_DOCKER_REGISTRY: Registry of released images, default to k8s.gcr.io
|
||||
# KUBE_BASE_IMAGE_REGISTRY: Registry of base images for controlplane binaries, default to k8s.gcr.io
|
||||
#
|
||||
# Example:
|
||||
# make release-skip-tests
|
||||
|
Loading…
Reference in New Issue
Block a user