mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Use debian-base instead of distroless for conformance image
The `diff` binary (required by the `kubectl diff` e2e test) gets statically or dynamically linked based on the used glibc version. We cannot really predict that behavior for the various platforms of debian-base and therefore cannot copy the binary around. This means that distroless is not a great choice for the conformance image unless we stop relying on `diff`. This means we now switch back to `debian-base` for the conformance image to simplify the build process and reduce the amount of moving parts. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
parent
90c362b343
commit
1000ed64e0
@ -12,19 +12,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
ARG BASEIMAGE
|
|
||||||
ARG RUNNERIMAGE
|
ARG RUNNERIMAGE
|
||||||
|
|
||||||
FROM ${BASEIMAGE} as debbase
|
|
||||||
|
|
||||||
FROM ${RUNNERIMAGE}
|
FROM ${RUNNERIMAGE}
|
||||||
|
|
||||||
# This is a dependency for `kubectl diff` tests
|
|
||||||
COPY --from=debbase /usr/bin/diff /usr/local/bin/
|
|
||||||
COPY --from=debbase /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu
|
|
||||||
COPY --from=debbase /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu
|
|
||||||
COPY --from=debbase /lib64/ld-linux-x86-64.so.2 /lib64
|
|
||||||
|
|
||||||
COPY cluster /kubernetes/cluster
|
COPY cluster /kubernetes/cluster
|
||||||
COPY ginkgo /usr/local/bin/
|
COPY ginkgo /usr/local/bin/
|
||||||
COPY e2e.test /usr/local/bin/
|
COPY e2e.test /usr/local/bin/
|
||||||
|
@ -34,12 +34,7 @@ CLUSTER_DIR?=$(shell pwd)/../../../cluster/
|
|||||||
# This is defined in root Makefile, but some build contexts do not refer to them
|
# This is defined in root Makefile, but some build contexts do not refer to them
|
||||||
KUBE_BASE_IMAGE_REGISTRY?=registry.k8s.io
|
KUBE_BASE_IMAGE_REGISTRY?=registry.k8s.io
|
||||||
BASE_IMAGE_VERSION?=bookworm-v1.0.0
|
BASE_IMAGE_VERSION?=bookworm-v1.0.0
|
||||||
BASEIMAGE?=${KUBE_BASE_IMAGE_REGISTRY}/build-image/debian-base-${ARCH}:${BASE_IMAGE_VERSION}
|
RUNNERIMAGE?=${KUBE_BASE_IMAGE_REGISTRY}/build-image/debian-base-${ARCH}:${BASE_IMAGE_VERSION}
|
||||||
|
|
||||||
# Keep debian releases (e.g. debian 11 == bullseye) consistent
|
|
||||||
# between BASE_IMAGE_VERSION and DISTROLESS_IMAGE images
|
|
||||||
DISTROLESS_IMAGE?=base-debian11
|
|
||||||
RUNNERIMAGE?=gcr.io/distroless/${DISTROLESS_IMAGE}:latest
|
|
||||||
|
|
||||||
TEMP_DIR:=$(shell mktemp -d -t conformance-XXXXXX)
|
TEMP_DIR:=$(shell mktemp -d -t conformance-XXXXXX)
|
||||||
|
|
||||||
@ -68,7 +63,6 @@ endif
|
|||||||
--load \
|
--load \
|
||||||
--pull \
|
--pull \
|
||||||
-t ${REGISTRY}/conformance-${ARCH}:${VERSION} \
|
-t ${REGISTRY}/conformance-${ARCH}:${VERSION} \
|
||||||
--build-arg BASEIMAGE=$(BASEIMAGE) \
|
|
||||||
--build-arg RUNNERIMAGE=$(RUNNERIMAGE) \
|
--build-arg RUNNERIMAGE=$(RUNNERIMAGE) \
|
||||||
${TEMP_DIR}
|
${TEMP_DIR}
|
||||||
rm -rf "${TEMP_DIR}"
|
rm -rf "${TEMP_DIR}"
|
||||||
|
Loading…
Reference in New Issue
Block a user