Switch to k8s.gcr.io vanity domain

This is the 2nd attempt.  The previous was reverted while we figured out
the regional mirrors (oops).

New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).

When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.

We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.
This commit is contained in:
Tim Hockin
2018-01-17 11:36:53 -08:00
parent c02b784b76
commit 3586986416
232 changed files with 486 additions and 469 deletions

View File

@@ -27,7 +27,7 @@ docker_build(
docker_bundle(
name = "hyperkube",
images = {"gcr.io/google-containers/hyperkube-amd64:{STABLE_DOCKER_TAG}": "hyperkube-internal"},
images = {"k8s.gcr.io/hyperkube-amd64:{STABLE_DOCKER_TAG}": "hyperkube-internal"},
stamp = True,
)

View File

@@ -16,7 +16,7 @@ FROM BASEIMAGE
# Create symlinks for each hyperkube server
# Also create symlinks to /usr/local/bin/ where the server image binaries live, so the hyperkube image may be
# used instead of gcr.io/google_containers/kube-* without any modifications.
# used instead of k8s.gcr.io/kube-* without any modifications.
# TODO: replace manual symlink creation with --make-symlink command once
# cross-building with qemu supports go binaries. See #28702
# RUN /hyperkube --make-symlinks

View File

@@ -15,14 +15,14 @@
# Build the hyperkube image.
#
# Usage:
# [ARCH=amd64] [REGISTRY="gcr.io/google-containers"] make (build|push) VERSION={some_released_version_of_kubernetes}
# [ARCH=amd64] [REGISTRY="staging-k8s.gcr.io"] make (build|push) VERSION={some_released_version_of_kubernetes}
REGISTRY?=gcr.io/google-containers
REGISTRY?=staging-k8s.gcr.io
ARCH?=amd64
OUT_DIR?=_output
HYPERKUBE_BIN?=$(OUT_DIR)/dockerized/bin/linux/$(ARCH)/hyperkube
BASEIMAGE=gcr.io/google-containers/debian-hyperkube-base-$(ARCH):0.8
BASEIMAGE=k8s.gcr.io/debian-hyperkube-base-$(ARCH):0.8
TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX)
all: build

View File

@@ -10,23 +10,23 @@
$ build/run.sh make cross
# Build for linux/amd64 (default)
# export REGISTRY=$HOST/$ORG to switch from gcr.io/google_containers
# export REGISTRY=$HOST/$ORG to switch from staging-k8s.gcr.io
$ make push VERSION={target_version} ARCH=amd64
# ---> gcr.io/google_containers/hyperkube-amd64:VERSION
# ---> gcr.io/google_containers/hyperkube:VERSION (image with backwards-compatible naming)
# ---> staging-k8s.gcr.io/hyperkube-amd64:VERSION
# ---> staging-k8s.gcr.io/hyperkube:VERSION (image with backwards-compatible naming)
$ make push VERSION={target_version} ARCH=arm
# ---> gcr.io/google_containers/hyperkube-arm:VERSION
# ---> staging-k8s.gcr.io/hyperkube-arm:VERSION
$ make push VERSION={target_version} ARCH=arm64
# ---> gcr.io/google_containers/hyperkube-arm64:VERSION
# ---> staging-k8s.gcr.io/hyperkube-arm64:VERSION
$ make push VERSION={target_version} ARCH=ppc64le
# ---> gcr.io/google_containers/hyperkube-ppc64le:VERSION
# ---> staging-k8s.gcr.io/hyperkube-ppc64le:VERSION
$ make push VERSION={target_version} ARCH=s390x
# ---> gcr.io/google_containers/hyperkube-s390x:VERSION
# ---> staging-k8s.gcr.io/hyperkube-s390x:VERSION
```
If you don't want to push the images, run `make` or `make build` instead