Fix the problem in building hyperkube for 3rd party registry

pull/6/head
Liyi Meng 2016-06-01 04:38:48 -04:00
parent 9a4c2feecb
commit 6c195a4923
6 changed files with 17 additions and 11 deletions

View File

@ -60,6 +60,7 @@ endif
cp ../../../_output/dockerized/bin/linux/${ARCH}/hyperkube ${TEMP_DIR}
cd ${TEMP_DIR} && sed -i.back "s|VERSION|${VERSION}|g" addons/*.yaml static-pods/*.json
cd ${TEMP_DIR} && sed -i.back "s|REGISTRY|${REGISTRY}|g" addons/*.yaml static-pods/*.json
cd ${TEMP_DIR} && sed -i.back "s|ARCH|${ARCH}|g" addons/*.yaml static-pods/*.json
cd ${TEMP_DIR} && sed -i.back "s|ARCH|${QEMUARCH}|g" Dockerfile
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile

View File

@ -32,7 +32,7 @@ spec:
hostNetwork: true
containers:
- name: kube-proxy
image: gcr.io/google_containers/hyperkube-ARCH:VERSION
image: REGISTRY/hyperkube-ARCH:VERSION
command:
- /hyperkube
- proxy

View File

@ -28,7 +28,7 @@
},
{
"name": "kube-addon-manager-data",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/copy-addons.sh"
],

View File

@ -10,7 +10,7 @@
"containers":[
{
"name": "controller-manager",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"controller-manager",
@ -29,7 +29,7 @@
},
{
"name": "apiserver",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"apiserver",
@ -55,7 +55,7 @@
},
{
"name": "scheduler",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"scheduler",
@ -65,7 +65,7 @@
},
{
"name": "setup",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/setup-files.sh",
"IP:10.0.0.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local"

View File

@ -10,7 +10,7 @@
"containers":[
{
"name": "controller-manager",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"controller-manager",
@ -29,7 +29,7 @@
},
{
"name": "apiserver",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"apiserver",
@ -55,7 +55,7 @@
},
{
"name": "scheduler",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"scheduler",
@ -65,7 +65,7 @@
},
{
"name": "setup",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"image": "REGISTRY/hyperkube-ARCH:VERSION",
"command": [
"/setup-files.sh",
"IP:10.0.0.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local"

View File

@ -17,7 +17,12 @@
# This script will build the hyperkube image and push it to the repository
# referred to by KUBE_DOCKER_REGISTRY and KUBE_DOCKER_OWNER. The image will
# be given a version tag with the value from KUBE_DOCKER_VERSION.
# e.g. run as:
# KUBE_DOCKER_REGISTRY=localhost:5000 KUBE_DOCKER_OWNER=liyi \
# KUBE_DOCKER_VERSION=1.3.0-dev ./hack/dev-push-hyperkube.sh
#
# will build image localhost:5000/liyi/hyperkube-amd64:1.3.0-dev
set -o errexit
set -o nounset
set -o pipefail