From b1c049efd884922d9e81172f3881d4defc5aa334 Mon Sep 17 00:00:00 2001 From: "Wilson E. Husin" Date: Fri, 12 Mar 2021 12:47:03 -0800 Subject: [PATCH] Use configurable BASEIMAGE and RUNNERIMAGE Following example on /cluster/images/etcd/Makefile --- cluster/images/conformance/Dockerfile | 7 ++++--- cluster/images/conformance/Makefile | 12 ++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/cluster/images/conformance/Dockerfile b/cluster/images/conformance/Dockerfile index 0d97e1fdd9e..e7785254274 100644 --- a/cluster/images/conformance/Dockerfile +++ b/cluster/images/conformance/Dockerfile @@ -13,13 +13,14 @@ # limitations under the License. ARG BASEIMAGE +ARG RUNNERIMAGE -FROM gcr.io/k8s-staging-build-image/debian-base:v2.1.3 as base +FROM ${BASEIMAGE} as debbase -FROM ${BASEIMAGE} +FROM ${RUNNERIMAGE} # This is a dependency for `kubectl diff` tests -COPY --from=base /usr/bin/diff /usr/local/bin/ +COPY --from=debbase /usr/bin/diff /usr/local/bin/ COPY cluster /kubernetes/cluster COPY ginkgo /usr/local/bin/ diff --git a/cluster/images/conformance/Makefile b/cluster/images/conformance/Makefile index b08aa1f319d..6a6c1335966 100644 --- a/cluster/images/conformance/Makefile +++ b/cluster/images/conformance/Makefile @@ -31,8 +31,15 @@ E2E_GO_RUNNER_BIN?=$(shell test -f $(LOCAL_OUTPUT_PATH)/go-runner && echo $(LOCA CLUSTER_DIR?=$(shell pwd)/../../../cluster/ -BASEIMAGE=gcr.io/distroless/base:latest -TEMP_DIR:=$(shell mktemp -d -t conformanceXXXXXX) +ifeq ($(ARCH),amd64) + BASEIMAGE?=${KUBE_BASE_IMAGE_REGISTRY}/build-image/debian-base:v2.1.3 +else + BASEIMAGE?=${KUBE_BASE_IMAGE_REGISTRY}/build-image/debian-base-${ARCH}:v2.1.3 +endif + +RUNNERIMAGE?=gcr.io/distroless/static:latest + +TEMP_DIR:=$(shell mktemp -d -t conformance-XXXXXX) all: build @@ -60,6 +67,7 @@ endif --pull \ -t ${REGISTRY}/conformance-${ARCH}:${VERSION} \ --build-arg BASEIMAGE=$(BASEIMAGE) \ + --build-arg RUNNERIMAGE=$(RUNNERIMAGE) \ ${TEMP_DIR} rm -rf "${TEMP_DIR}"