Skip to content

Commit

Permalink
Add linux/arm to the list of server builds
Browse files Browse the repository at this point in the history
  • Loading branch information
brendandburns committed Nov 23, 2015
1 parent 4692467 commit d2dbe56
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 14 deletions.
8 changes: 6 additions & 2 deletions build/pause/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
.PHONY: build push

IMAGE = pause
TAG = 2.0

ARCH = amd64
IMAGE = pause
# ARCH = arm
# IMAGE = pause-arm

build:
./prepare.sh
./prepare.sh ${ARCH}
docker build -t gcr.io/google_containers/$(IMAGE):$(TAG) .

push: build
Expand Down
4 changes: 3 additions & 1 deletion build/pause/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
set -e
set -x

ARCH=$1

# Build the binary.
go build --ldflags '-extldflags "-static" -s' pause.go
CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} godep go build -a -installsuffix cgo -ldflags '-w' ./pause.go

# Run goupx to shrink binary size.
go get github.com/pwaller/goupx
Expand Down
2 changes: 1 addition & 1 deletion cluster/images/hyperkube/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:jessie
FROM BASEIMAGE

RUN DEBIAN_FRONTEND=noninteractive apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get -yy -q \
Expand Down
22 changes: 18 additions & 4 deletions cluster/images/hyperkube/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# build the hyperkube image.

VERSION=v1.1.1
VERSION=v1.1.2
ARCH=amd64
BASEIMAGE=debian:jessie

## Comment in for arm builds, must be run on an arm machine
# ARCH=arm
# need to escape '/' for the regexp below
# BASEIMAGE=armbuild\\/debian:jessie

all:
cp ../../saltbase/salt/helpers/safe_format_and_mount .
cp ../../saltbase/salt/generate-cert/make-ca-cert.sh .
curl -O https://storage.googleapis.com/kubernetes-release/release/${VERSION}/bin/linux/amd64/hyperkube
curl -O https://storage.googleapis.com/kubernetes-release/release/${VERSION}/bin/linux/${ARCH}/hyperkube
sed -i "s/VERSION/${VERSION}/g" master-multi.json master.json
docker build -t gcr.io/google_containers/hyperkube:${VERSION} .
gcloud docker push gcr.io/google_containers/hyperkube:${VERSION}
sed -i "s/ARCH/${ARCH}/g" master-multi.json master.json
sed -i "s/BASEIMAGE/${BASEIMAGE}/g" Dockerfile
docker build -t gcr.io/google_containers/hyperkube-${ARCH}:${VERSION} .
gcloud docker push gcr.io/google_containers/hyperkube-${ARCH}:${VERSION}
# Backward compatability. TODO: deprecate this image tag
ifeq ($(ARCH),amd64)
docker tag gcr.io/google_containers/hyperkube-${ARCH}:${VERSION} gcr.io/google_containers/hyperkube:${VERSION}
gcloud docker push gcr.io/google_containers/hyperkube:${VERSION}
endif

.PHONY: all
6 changes: 3 additions & 3 deletions cluster/images/hyperkube/master-multi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"containers":[
{
"name": "controller-manager",
"image": "gcr.io/google_containers/hyperkube:VERSION",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"controller-manager",
Expand All @@ -19,7 +19,7 @@
},
{
"name": "apiserver",
"image": "gcr.io/google_containers/hyperkube:VERSION",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"apiserver",
Expand All @@ -33,7 +33,7 @@
},
{
"name": "scheduler",
"image": "gcr.io/google_containers/hyperkube:VERSION",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"scheduler",
Expand Down
6 changes: 3 additions & 3 deletions cluster/images/hyperkube/master.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"containers":[
{
"name": "controller-manager",
"image": "gcr.io/google_containers/hyperkube:VERSION",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"controller-manager",
Expand All @@ -26,7 +26,7 @@
},
{
"name": "apiserver",
"image": "gcr.io/google_containers/hyperkube:VERSION",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"apiserver",
Expand All @@ -53,7 +53,7 @@
},
{
"name": "scheduler",
"image": "gcr.io/google_containers/hyperkube:VERSION",
"image": "gcr.io/google_containers/hyperkube-ARCH:VERSION",
"command": [
"/hyperkube",
"scheduler",
Expand Down
1 change: 1 addition & 0 deletions hack/lib/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ readonly KUBE_SERVER_BINARIES=("${KUBE_SERVER_TARGETS[@]##*/}")
# The server platform we are building on.
readonly KUBE_SERVER_PLATFORMS=(
linux/amd64
linux/arm
)

# The set of client targets that we are building for all platforms
Expand Down

0 comments on commit d2dbe56

Please sign in to comment.