From 517e25c3d0944c94fd5cc2523268b4eb7dad7c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Serv=C3=A9n?= Date: Wed, 14 Jun 2017 23:55:36 +0000 Subject: [PATCH 1/4] cluster/images/hyperkube: Add the Calico binary --- cluster/images/hyperkube/Dockerfile | 3 +++ cluster/images/hyperkube/Makefile | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cluster/images/hyperkube/Dockerfile b/cluster/images/hyperkube/Dockerfile index bde5343c1471d..451dbe41b77b3 100644 --- a/cluster/images/hyperkube/Dockerfile +++ b/cluster/images/hyperkube/Dockerfile @@ -14,6 +14,9 @@ FROM BASEIMAGE +# Copy calico to cni bin +COPY cni-bin/bin/ /opt/cni/bin + # 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. diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 5f9da307b6155..0f1f49ff6ad41 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -26,7 +26,7 @@ TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX) all: build -build: +build: calico ifndef VERSION $(error VERSION is undefined) @@ -51,4 +51,9 @@ ifeq ($(ARCH),amd64) gcloud docker -- push ${REGISTRY}/hyperkube:${VERSION} endif -.PHONY: build push all +calico: + mkdir -p ${TEMP_DIR}/cni-bin/bin + curl -sSL --retry 5 -o ${TEMP_DIR}/cni-bin/bin/calico https://github.com/projectcalico/calico-cni/releases/download/v1.10.0/calico + chmod +x ${TEMP_DIR}/cni-bin/bin/calico + +.PHONY: build push all calico From df91fa682f7b62f5d7a1f317fa284cc559d7f257 Mon Sep 17 00:00:00 2001 From: Lucas Serven Date: Mon, 25 Sep 2017 12:25:28 +0200 Subject: [PATCH 2/4] cluster/images/hyperkube: bump Calico to v1.11.0 --- cluster/images/hyperkube/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 0f1f49ff6ad41..27ecd9ec1a6cc 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -53,7 +53,7 @@ endif calico: mkdir -p ${TEMP_DIR}/cni-bin/bin - curl -sSL --retry 5 -o ${TEMP_DIR}/cni-bin/bin/calico https://github.com/projectcalico/calico-cni/releases/download/v1.10.0/calico + curl -sSL --retry 5 -o ${TEMP_DIR}/cni-bin/bin/calico https://github.com/projectcalico/calico-cni/releases/download/v1.11.0/calico chmod +x ${TEMP_DIR}/cni-bin/bin/calico .PHONY: build push all calico From 5b779607817736fa305627b1cb6d1d3fd73643a1 Mon Sep 17 00:00:00 2001 From: Lucas Serven Date: Wed, 25 Oct 2017 16:52:19 +0200 Subject: [PATCH 3/4] cluster/images/hyperkube: install cni plugins v0.6.0 --- cluster/images/hyperkube/Dockerfile | 2 +- cluster/images/hyperkube/Makefile | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cluster/images/hyperkube/Dockerfile b/cluster/images/hyperkube/Dockerfile index 451dbe41b77b3..3346f7a61f3e4 100644 --- a/cluster/images/hyperkube/Dockerfile +++ b/cluster/images/hyperkube/Dockerfile @@ -14,7 +14,7 @@ FROM BASEIMAGE -# Copy calico to cni bin +# Copy CNI binaries COPY cni-bin/bin/ /opt/cni/bin # Create symlinks for each hyperkube server diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 27ecd9ec1a6cc..794174a1eb6d7 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -20,13 +20,15 @@ REGISTRY?=gcr.io/google-containers ARCH?=amd64 HYPERKUBE_BIN?=_output/dockerized/bin/linux/$(ARCH)/hyperkube +CALICO_RELEASE=v1.11.0 +CNI_RELEASE=v0.6.0 BASEIMAGE=gcr.io/google-containers/debian-hyperkube-base-$(ARCH):0.3 TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX) all: build -build: calico +build: cni ifndef VERSION $(error VERSION is undefined) @@ -51,9 +53,11 @@ ifeq ($(ARCH),amd64) gcloud docker -- push ${REGISTRY}/hyperkube:${VERSION} endif -calico: +cni: mkdir -p ${TEMP_DIR}/cni-bin/bin - curl -sSL --retry 5 -o ${TEMP_DIR}/cni-bin/bin/calico https://github.com/projectcalico/calico-cni/releases/download/v1.11.0/calico + curl -sSL --retry 5 https://github.com/containernetworking/cni/releases/download/${CNI_RELEASE}/cni-${ARCH}-${CNI_RELEASE}.tgz | tar -xz -C ${TEMP_DIR}/cni-bin/bin + curl -sSL --retry 5 https://github.com/containernetworking/plugins/releases/download/${CNI_RELEASE}/cni-plugins-${ARCH}-${CNI_RELEASE}.tgz | tar -xz -C ${TEMP_DIR}/cni-bin/bin + curl -sSL --retry 5 -o ${TEMP_DIR}/cni-bin/bin/calico https://github.com/projectcalico/calico-cni/releases/download/${CALICO_RELEASE}/calico chmod +x ${TEMP_DIR}/cni-bin/bin/calico -.PHONY: build push all calico +.PHONY: build push all cni From 4d0212295e4f52ac094d3369ad154a7ed4fc1c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cruz?= Date: Tue, 10 Oct 2017 10:53:02 +0100 Subject: [PATCH 4/4] Ensure base image includes the modprobe binary --- build/debian-hyperkube-base/Dockerfile | 1 + build/debian-hyperkube-base/Makefile | 2 +- cluster/images/hyperkube/Makefile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/debian-hyperkube-base/Dockerfile b/build/debian-hyperkube-base/Dockerfile index 6e93390c0e1ff..a4882d87ba278 100644 --- a/build/debian-hyperkube-base/Dockerfile +++ b/build/debian-hyperkube-base/Dockerfile @@ -24,6 +24,7 @@ RUN echo CACHEBUST>/dev/null && clean-install \ e2fsprogs \ ebtables \ ethtool \ + kmod \ ca-certificates \ conntrack \ util-linux \ diff --git a/build/debian-hyperkube-base/Makefile b/build/debian-hyperkube-base/Makefile index f7b96f8b07ef2..365d0d8294b5c 100644 --- a/build/debian-hyperkube-base/Makefile +++ b/build/debian-hyperkube-base/Makefile @@ -19,7 +19,7 @@ REGISTRY?=gcr.io/google-containers IMAGE?=debian-hyperkube-base -TAG=0.3 +TAG=0.4 ARCH?=amd64 CACHEBUST?=1 diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 794174a1eb6d7..a98090dafd091 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -23,7 +23,7 @@ HYPERKUBE_BIN?=_output/dockerized/bin/linux/$(ARCH)/hyperkube CALICO_RELEASE=v1.11.0 CNI_RELEASE=v0.6.0 -BASEIMAGE=gcr.io/google-containers/debian-hyperkube-base-$(ARCH):0.3 +BASEIMAGE=gcr.io/google-containers/debian-hyperkube-base-$(ARCH):0.4 TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX) all: build