Skip to content

Commit

Permalink
Merge pull request #67460 from ixdy/automated-cherry-pick-of-#67026-#…
Browse files Browse the repository at this point in the history
…67222-#67283-#67365-upstream-release-1.11

release-1.11: update to debian-base 0.3.2, debian-iptables v10.2 and hyperkube-base 0.10.2
  • Loading branch information
k8s-ci-robot authored Oct 4, 2018
2 parents 16498a2 + 7acd273 commit e920cf3
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 57 deletions.
2 changes: 1 addition & 1 deletion build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ readonly KUBE_CONTAINER_RSYNC_PORT=8730
#
# $1 - server architecture
kube::build::get_docker_wrapped_binaries() {
debian_iptables_version=v10
debian_iptables_version=v10.2
### If you change any of these lists, please also update DOCKERIZED_BINARIES
### in build/BUILD.
case $1 in
Expand Down
6 changes: 4 additions & 2 deletions build/debian-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ REGISTRY ?= staging-k8s.gcr.io
IMAGE ?= debian-base
BUILD_IMAGE ?= debian-build

TAG ?= 0.3
TAG ?= 0.3.2

TAR_FILE ?= rootfs.tar
ARCH?=amd64
Expand Down Expand Up @@ -57,9 +57,11 @@ ifeq ($(ARCH),amd64)
sed "/CROSS_BUILD_/d" $(TEMP_DIR)/Dockerfile.build > $(TEMP_DIR)/Dockerfile.build.tmp
else
# 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 non-x86 binaries in the kernel
docker run --rm --privileged multiarch/qemu-user-static:register --reset
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)
# Ensure we don't get surprised by umask settings
chmod 0755 $(TEMP_DIR)/qemu-$(QEMUARCH)-static
sed "s/CROSS_BUILD_//g" $(TEMP_DIR)/Dockerfile.build > $(TEMP_DIR)/Dockerfile.build.tmp
endif
mv $(TEMP_DIR)/Dockerfile.build.tmp $(TEMP_DIR)/Dockerfile.build
Expand Down
1 change: 1 addition & 0 deletions build/debian-hyperkube-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN echo CACHEBUST>/dev/null && clean-install \
jq \
kmod \
openssh-client \
netbase \
nfs-common \
socat \
udev \
Expand Down
6 changes: 4 additions & 2 deletions build/debian-hyperkube-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

REGISTRY?=staging-k8s.gcr.io
IMAGE?=debian-hyperkube-base
TAG=0.10
TAG=0.10.2
ARCH?=amd64
CACHEBUST?=1

BASEIMAGE=k8s.gcr.io/debian-base-$(ARCH):0.3
BASEIMAGE=k8s.gcr.io/debian-base-$(ARCH):0.3.2
CNI_VERSION=v0.6.0

TEMP_DIR:=$(shell mktemp -d)
Expand Down Expand Up @@ -51,8 +51,10 @@ endif
mkdir -p ${TEMP_DIR}/cni-bin/bin
tar -xz -C ${TEMP_DIR}/cni-bin/bin -f "cni-tars/${CNI_TARBALL}"

ifneq ($(ARCH),amd64)
# Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel
docker run --rm --privileged multiarch/qemu-user-static:register --reset
endif
docker build --pull -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG) $(TEMP_DIR)
rm -rf $(TEMP_DIR)

Expand Down
7 changes: 2 additions & 5 deletions build/debian-iptables/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@

FROM BASEIMAGE

# If we're building for another architecture than amd64, the CROSS_BUILD_ placeholder is removed so e.g. CROSS_BUILD_COPY turns into COPY
# If we're building normally, for amd64, CROSS_BUILD lines are removed
CROSS_BUILD_COPY qemu-ARCH-static /usr/bin/

RUN clean-install \
conntrack \
ebtables \
ipset \
iptables \
kmod
kmod \
netbase
31 changes: 5 additions & 26 deletions build/debian-iptables/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,19 @@

REGISTRY?="staging-k8s.gcr.io"
IMAGE=debian-iptables
TAG=v10
TAG=v10.2
ARCH?=amd64
TEMP_DIR:=$(shell mktemp -d)
QEMUVERSION=v2.9.1

ifeq ($(ARCH),arm)
QEMUARCH=arm
endif
ifeq ($(ARCH),arm64)
QEMUARCH=aarch64
endif
ifeq ($(ARCH),ppc64le)
QEMUARCH=ppc64le
endif
ifeq ($(ARCH),s390x)
QEMUARCH=s390x
endif

BASEIMAGE=k8s.gcr.io/debian-base-$(ARCH):0.3
BASEIMAGE=k8s.gcr.io/debian-base-$(ARCH):0.3.2

build:
cp ./* $(TEMP_DIR)
cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile
cd $(TEMP_DIR) && sed -i "s|ARCH|$(QEMUARCH)|g" Dockerfile

ifeq ($(ARCH),amd64)
# When building "normally" for amd64, remove the whole line, it has no part in the amd64 image
cd $(TEMP_DIR) && sed -i "/CROSS_BUILD_/d" Dockerfile
else
# 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

ifneq ($(ARCH),amd64)
# Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel
docker run --rm --privileged multiarch/qemu-user-static:register --reset
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
endif

docker build --pull -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG) $(TEMP_DIR)
Expand Down
8 changes: 4 additions & 4 deletions build/root/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ http_file(

docker_pull(
name = "debian-iptables-amd64",
digest = "sha256:fb18678f8203ca1bd2fad2671e3ebd80cb408a1baae423d4ad39c05f4caac4e1",
digest = "sha256:0987db7ce42949d20ed2647a65d4bee0b616b4d40c7ea54769cc24b7ad003677",
registry = "k8s.gcr.io",
repository = "debian-iptables-amd64",
tag = "v10", # ignored, but kept here for documentation
tag = "v10.2", # ignored, but kept here for documentation
)

docker_pull(
name = "debian-hyperkube-base-amd64",
digest = "sha256:cc782ed16599000ca4c85d47ec6264753747ae1e77520894dca84b104a7621e2",
digest = "sha256:c50522965140c9f206900bf47d547d601c04943e1e59801ba5f70235773cfbb6",
registry = "k8s.gcr.io",
repository = "debian-hyperkube-base-amd64",
tag = "0.10", # ignored, but kept here for documentation
tag = "0.10.2", # ignored, but kept here for documentation
)

docker_pull(
Expand Down
4 changes: 3 additions & 1 deletion cluster/images/hyperkube/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ARCH?=amd64
OUT_DIR?=_output
HYPERKUBE_BIN?=$(shell pwd)/../../../$(OUT_DIR)/dockerized/bin/linux/$(ARCH)/hyperkube

BASEIMAGE=k8s.gcr.io/debian-hyperkube-base-$(ARCH):0.10
BASEIMAGE=k8s.gcr.io/debian-hyperkube-base-$(ARCH):0.10.2
TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX)

all: build
Expand All @@ -39,8 +39,10 @@ endif

cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile

ifneq ($(ARCH),amd64)
# Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel
docker run --rm --privileged multiarch/qemu-user-static:register --reset
endif
docker build --pull -t ${REGISTRY}/hyperkube-${ARCH}:${VERSION} ${TEMP_DIR}
rm -rf "${TEMP_DIR}"

Expand Down
2 changes: 2 additions & 0 deletions test/images/image-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ build() {
# Register qemu-*-static for all supported processors except the current one
docker run --rm --privileged multiarch/qemu-user-static:register --reset
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/${QEMUVERSION}/x86_64_qemu-${QEMUARCHS[$arch]}-static.tar.gz | tar -xz -C ${temp_dir}
# Ensure we don't get surprised by umask settings
chmod 0755 "${temp_dir}/qemu-${QEMUARCHS[$arch]}-static"
sed -i "s/CROSS_BUILD_//g" Dockerfile
fi
fi
Expand Down
8 changes: 4 additions & 4 deletions test/images/pets/peer-finder/BASEIMAGE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amd64=k8s.gcr.io/debian-base-amd64:0.3
arm=k8s.gcr.io/debian-base-arm:0.3
arm64=k8s.gcr.io/debian-base-arm64:0.3
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3
amd64=k8s.gcr.io/debian-base-amd64:0.3.2
arm=k8s.gcr.io/debian-base-arm:0.3.2
arm64=k8s.gcr.io/debian-base-arm64:0.3.2
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3.2
8 changes: 4 additions & 4 deletions test/images/pets/redis-installer/BASEIMAGE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amd64=k8s.gcr.io/debian-base-amd64:0.3
arm=k8s.gcr.io/debian-base-arm:0.3
arm64=k8s.gcr.io/debian-base-arm64:0.3
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3
amd64=k8s.gcr.io/debian-base-amd64:0.3.2
arm=k8s.gcr.io/debian-base-arm:0.3.2
arm64=k8s.gcr.io/debian-base-arm64:0.3.2
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3.2
8 changes: 4 additions & 4 deletions test/images/pets/zookeeper-installer/BASEIMAGE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amd64=k8s.gcr.io/debian-base-amd64:0.3
arm=k8s.gcr.io/debian-base-arm:0.3
arm64=k8s.gcr.io/debian-base-arm64:0.3
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3
amd64=k8s.gcr.io/debian-base-amd64:0.3.2
arm=k8s.gcr.io/debian-base-arm:0.3.2
arm64=k8s.gcr.io/debian-base-arm64:0.3.2
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3.2
8 changes: 4 additions & 4 deletions test/images/resource-consumer/BASEIMAGE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amd64=k8s.gcr.io/debian-base-amd64:0.3
arm=k8s.gcr.io/debian-base-arm:0.3
arm64=k8s.gcr.io/debian-base-arm64:0.3
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3
amd64=k8s.gcr.io/debian-base-amd64:0.3.2
arm=k8s.gcr.io/debian-base-arm:0.3.2
arm64=k8s.gcr.io/debian-base-arm64:0.3.2
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3.2

0 comments on commit e920cf3

Please sign in to comment.