mirror of https://github.com/k3s-io/k3s
Upgrade go version in Makefiles to 1.7, use qemu 2.7, armel => armhf and goarm=6 => goarm=7 and use go 1.7.4
parent
04bc44acf9
commit
84006601a0
|
@ -22,13 +22,14 @@ CNI_RELEASE?=07a8a28637e97b22eb8dfe710eeae1344f69d16e
|
||||||
CNI_TARBALL=cni-$(ARCH)-$(CNI_RELEASE).tar.gz
|
CNI_TARBALL=cni-$(ARCH)-$(CNI_RELEASE).tar.gz
|
||||||
CUR_DIR=$(shell pwd)
|
CUR_DIR=$(shell pwd)
|
||||||
OUTPUT_DIR=$(CUR_DIR)/output
|
OUTPUT_DIR=$(CUR_DIR)/output
|
||||||
|
GOLANG_VERSION=1.7.4
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
mkdir -p $(OUTPUT_DIR)
|
mkdir -p $(OUTPUT_DIR)
|
||||||
|
|
||||||
docker run -it -v $(OUTPUT_DIR):/output golang:1.6 /bin/bash -c "\
|
docker run -it -v $(OUTPUT_DIR):/output golang:$(GOLANG_VERSION) /bin/bash -c "\
|
||||||
git clone https://github.com/containernetworking/cni\
|
git clone https://github.com/containernetworking/cni\
|
||||||
&& cd cni \
|
&& cd cni \
|
||||||
&& git checkout $(CNI_RELEASE) \
|
&& git checkout $(CNI_RELEASE) \
|
||||||
|
|
|
@ -21,7 +21,8 @@ CROSS_BUILD_COPY qemu-ARCH-static /usr/bin/
|
||||||
# All apt-get's must be in one run command or the
|
# All apt-get's must be in one run command or the
|
||||||
# cleanup has no effect.
|
# cleanup has no effect.
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y iptables \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y ebtables \
|
iptables \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y conntrack \
|
ebtables \
|
||||||
|
conntrack \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
|
@ -16,15 +16,16 @@
|
||||||
|
|
||||||
REGISTRY?="gcr.io/google_containers"
|
REGISTRY?="gcr.io/google_containers"
|
||||||
IMAGE=debian-iptables
|
IMAGE=debian-iptables
|
||||||
TAG=v5
|
TAG=v6
|
||||||
ARCH?=amd64
|
ARCH?=amd64
|
||||||
TEMP_DIR:=$(shell mktemp -d)
|
TEMP_DIR:=$(shell mktemp -d)
|
||||||
|
QEMUVERSION=v2.7.0
|
||||||
|
|
||||||
ifeq ($(ARCH),amd64)
|
ifeq ($(ARCH),amd64)
|
||||||
BASEIMAGE?=debian:jessie
|
BASEIMAGE?=debian:jessie
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
BASEIMAGE?=armel/debian:jessie
|
BASEIMAGE?=armhf/debian:jessie
|
||||||
QEMUARCH=arm
|
QEMUARCH=arm
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm64)
|
ifeq ($(ARCH),arm64)
|
||||||
|
@ -52,7 +53,7 @@ else
|
||||||
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
|
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
|
||||||
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
|
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
|
||||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/v2.6.0/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)
|
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)
|
||||||
cd $(TEMP_DIR) && sed -i "s/CROSS_BUILD_//g" Dockerfile
|
cd $(TEMP_DIR) && sed -i "s/CROSS_BUILD_//g" Dockerfile
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
### Version 6.2 (Wed January 18 2017 Lucas Käldström <lucas.kaldstrom@hotmail.co.uk>)
|
||||||
|
- Updated the arm base image to `armhf/busybox` and now using qemu v2.7 for emulation.
|
||||||
|
|
||||||
### Version 6.2 (Thu January 12 2017 Zihong Zheng <zihongz@google.com>)
|
### Version 6.2 (Thu January 12 2017 Zihong Zheng <zihongz@google.com>)
|
||||||
- Update kubectl to the stable version.
|
- Update kubectl to the stable version.
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
IMAGE=gcr.io/google-containers/kube-addon-manager
|
IMAGE=gcr.io/google-containers/kube-addon-manager
|
||||||
ARCH?=amd64
|
ARCH?=amd64
|
||||||
TEMP_DIR:=$(shell mktemp -d)
|
TEMP_DIR:=$(shell mktemp -d)
|
||||||
VERSION=v6.2
|
VERSION=v6.3
|
||||||
KUBECTL_VERSION?=v1.5.2
|
KUBECTL_VERSION?=v1.5.2
|
||||||
|
|
||||||
ifeq ($(ARCH),amd64)
|
ifeq ($(ARCH),amd64)
|
||||||
BASEIMAGE?=bashell/alpine-bash
|
BASEIMAGE?=bashell/alpine-bash
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
BASEIMAGE?=armel/debian
|
BASEIMAGE?=armhf/debian
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm64)
|
ifeq ($(ARCH),arm64)
|
||||||
BASEIMAGE?=aarch64/debian
|
BASEIMAGE?=aarch64/debian
|
||||||
|
|
|
@ -30,15 +30,15 @@ TAGS?=2.2.1 2.3.7 3.0.14
|
||||||
REGISTRY_TAG?=3.0.14
|
REGISTRY_TAG?=3.0.14
|
||||||
ARCH?=amd64
|
ARCH?=amd64
|
||||||
REGISTRY?=gcr.io/google_containers
|
REGISTRY?=gcr.io/google_containers
|
||||||
GOLANG_VERSION?=1.6.3
|
GOLANG_VERSION?=1.7.4
|
||||||
GOARM=6
|
GOARM=7
|
||||||
TEMP_DIR:=$(shell mktemp -d)
|
TEMP_DIR:=$(shell mktemp -d)
|
||||||
|
|
||||||
ifeq ($(ARCH),amd64)
|
ifeq ($(ARCH),amd64)
|
||||||
BASEIMAGE?=busybox
|
BASEIMAGE?=busybox
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
BASEIMAGE?=armel/busybox
|
BASEIMAGE?=armhf/busybox
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm64)
|
ifeq ($(ARCH),arm64)
|
||||||
BASEIMAGE?=aarch64/busybox
|
BASEIMAGE?=aarch64/busybox
|
||||||
|
|
|
@ -22,6 +22,7 @@ ARCH?=amd64
|
||||||
TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX)
|
TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX)
|
||||||
CNI_RELEASE=07a8a28637e97b22eb8dfe710eeae1344f69d16e
|
CNI_RELEASE=07a8a28637e97b22eb8dfe710eeae1344f69d16e
|
||||||
CACHEBUST?=1
|
CACHEBUST?=1
|
||||||
|
QEMUVERSION=v2.7.0
|
||||||
|
|
||||||
UNAME_S:=$(shell uname -s)
|
UNAME_S:=$(shell uname -s)
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
@ -35,7 +36,7 @@ ifeq ($(ARCH),amd64)
|
||||||
BASEIMAGE?=debian:jessie
|
BASEIMAGE?=debian:jessie
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
BASEIMAGE?=armel/debian:jessie
|
BASEIMAGE?=armhf/debian:jessie
|
||||||
QEMUARCH=arm
|
QEMUARCH=arm
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm64)
|
ifeq ($(ARCH),arm64)
|
||||||
|
@ -104,7 +105,7 @@ else
|
||||||
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
|
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
|
||||||
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
|
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
|
||||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
curl -sSL --retry 5 https://github.com/multiarch/qemu-user-static/releases/download/v2.5.0/x86_64_qemu-${QEMUARCH}-static.tar.xz | tar -xJ -C ${TEMP_DIR}
|
curl -sSL --retry 5 https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-${QEMUARCH}-static.tar.gz | tar -xz -C ${TEMP_DIR}
|
||||||
endif
|
endif
|
||||||
# Download CNI
|
# Download CNI
|
||||||
curl -sSL --retry 5 https://storage.googleapis.com/kubernetes-release/network-plugins/cni-${ARCH}-${CNI_RELEASE}.tar.gz | tar -xz -C ${TEMP_DIR}/cni-bin
|
curl -sSL --retry 5 https://storage.googleapis.com/kubernetes-release/network-plugins/cni-${ARCH}-${CNI_RELEASE}.tar.gz | tar -xz -C ${TEMP_DIR}/cni-bin
|
||||||
|
|
|
@ -29,7 +29,7 @@ ifeq ($(ARCH),amd64)
|
||||||
BASEIMAGE?=debian:jessie
|
BASEIMAGE?=debian:jessie
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
BASEIMAGE?=armel/debian:jessie
|
BASEIMAGE?=armhf/debian:jessie
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm64)
|
ifeq ($(ARCH),arm64)
|
||||||
BASEIMAGE?=aarch64/debian:jessie
|
BASEIMAGE?=aarch64/debian:jessie
|
||||||
|
|
|
@ -26,7 +26,7 @@ BIN_DIR?=../../../../_output/dockerized/bin/linux/${ARCH}
|
||||||
TEMP_DIR:=$(shell mktemp -d)
|
TEMP_DIR:=$(shell mktemp -d)
|
||||||
|
|
||||||
BASEIMAGE_amd64=debian:jessie
|
BASEIMAGE_amd64=debian:jessie
|
||||||
BASEIMAGE_arm=armel/debian:jessie
|
BASEIMAGE_arm=armhf/debian:jessie
|
||||||
BASEIMAGE_arm64=aarch64/debian:jessie
|
BASEIMAGE_arm64=aarch64/debian:jessie
|
||||||
BASEIMAGE_ppc64le=ppc64le/debian:jessie
|
BASEIMAGE_ppc64le=ppc64le/debian:jessie
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
# Cross-build the serve_hostname image
|
# Cross-build the serve_hostname image
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# [TAG=v1.5] [PREFIX=gcr.io/google_containers] [TEST_REGISTRY=gcr.io/k8s-authenticated-test] [ARCH=amd64] [BASEIMAGE=busybox] make all
|
# [TAG=v1.6] [PREFIX=gcr.io/google_containers] [TEST_REGISTRY=gcr.io/k8s-authenticated-test] [ARCH=amd64] [BASEIMAGE=busybox] make all
|
||||||
|
|
||||||
.PHONY: all push container clean
|
.PHONY: all push container clean
|
||||||
|
|
||||||
TAG ?= v1.5
|
TAG ?= v1.6
|
||||||
|
|
||||||
REGISTRY ?= gcr.io/google-containers
|
REGISTRY ?= gcr.io/google-containers
|
||||||
TEST_REGISTRY ?= gcr.io/k8s-authenticated-test
|
TEST_REGISTRY ?= gcr.io/k8s-authenticated-test
|
||||||
|
@ -29,9 +29,9 @@ ARCH ?= amd64
|
||||||
|
|
||||||
ALL_ARCH = amd64 arm arm64 ppc64le s390x
|
ALL_ARCH = amd64 arm arm64 ppc64le s390x
|
||||||
|
|
||||||
GOARM=6
|
GOARM=7
|
||||||
TEMP_DIR := $(shell mktemp -d)
|
TEMP_DIR := $(shell mktemp -d)
|
||||||
GOLANG_VERSION = 1.6.3
|
GOLANG_VERSION=1.7.4
|
||||||
|
|
||||||
BIN = serve_hostname
|
BIN = serve_hostname
|
||||||
SRCS = serve_hostname.go
|
SRCS = serve_hostname.go
|
||||||
|
@ -44,7 +44,7 @@ ifeq ($(ARCH),amd64)
|
||||||
BASEIMAGE?=busybox
|
BASEIMAGE?=busybox
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
BASEIMAGE?=armel/busybox
|
BASEIMAGE?=armhf/busybox
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),arm64)
|
ifeq ($(ARCH),arm64)
|
||||||
BASEIMAGE?=aarch64/busybox
|
BASEIMAGE?=aarch64/busybox
|
||||||
|
|
Loading…
Reference in New Issue