Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debian-base: switch to debian bookworm #3127

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,11 @@ dependencies:
match: OS_CODENAME\ \?=\ bullseye
- path: images/build/cross/variants.yaml
match: "OS_CODENAME: 'bullseye'"
- path: images/build/debian-base/Makefile
match: CONFIG\ \?=\ bullseye
- path: images/build/debian-base/variants.yaml
match: "CONFIG: 'bullseye'"
# TODO: revert once all images are on bookworm
# - path: images/build/debian-base/Makefile
# match: CONFIG\ \?=\ bullseye
# - path: images/build/debian-base/variants.yaml
# match: "CONFIG: 'bullseye'"
- path: images/build/debian-iptables/Makefile
match: CONFIG\ \?=\ bullseye
- path: images/build/debian-iptables/variants.yaml
Expand All @@ -410,26 +411,27 @@ dependencies:
match: FROM golang:\d+.\d+(alpha|beta|rc)?\.?(\d+)-bullseye

- name: "Debian: codename (next candidate)"
version: bullseye
version: bookworm
refPaths:
- path: images/build/cross/variants.yaml
match: "OS_CODENAME: 'bullseye'"
# TODO: revert once all images are on bookworm
# - path: images/build/cross/variants.yaml
# match: "OS_CODENAME: 'bullseye'"
- path: images/build/debian-base/variants.yaml
match: "CONFIG: 'bullseye'"
- path: images/build/go-runner/variants.yaml
match: "OS_CODENAME: 'bullseye'"
- path: images/releng/ci/variants.yaml
match: "OS_CODENAME: 'bullseye'"
- path: images/releng/k8s-ci-builder/variants.yaml
match: "OS_CODENAME: 'bullseye'"
match: "CONFIG: 'bookworm'"
# - path: images/build/go-runner/variants.yaml
# match: "OS_CODENAME: 'bullseye'"
# - path: images/releng/ci/variants.yaml
# match: "OS_CODENAME: 'bullseye'"
# - path: images/releng/k8s-ci-builder/variants.yaml
# match: "OS_CODENAME: 'bullseye'"

- name: "registry.k8s.io/build-image/debian-base"
version: bullseye-v1.4.3
version: bookworm-v1.0.0
refPaths:
- path: images/build/debian-base/Makefile
match: IMAGE_VERSION\ \?=\ bullseye-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)
match: IMAGE_VERSION\ \?=\ bookworm-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)
- path: images/build/debian-base/variants.yaml
match: "IMAGE_VERSION: 'bullseye-v((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)'"
match: "IMAGE_VERSION: 'bookworm-v((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)'"

- name: "registry.k8s.io/build-image/debian-base: dependents"
version: bullseye-v1.4.3
Expand Down Expand Up @@ -475,10 +477,10 @@ dependencies:

# Base images (next candidate)
- name: "registry.k8s.io/build-image/debian-base (next candidate)"
version: bullseye-v1.4.3
version: bookworm-v1.0.0
refPaths:
- path: images/build/debian-base/variants.yaml
match: "IMAGE_VERSION: 'bullseye-v((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)'"
match: "IMAGE_VERSION: 'bookworm-v((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)'"

- name: "registry.k8s.io/build-image/debian-base: dependents (next candidate)"
version: bullseye-v1.4.3
Expand Down
4 changes: 2 additions & 2 deletions images/build/debian-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ IMAGE ?= $(REGISTRY)/debian-base
BUILD_IMAGE ?= debian-build

TAG ?= $(shell git describe --tags --always --dirty)
IMAGE_VERSION ?= bullseye-v1.4.3
CONFIG ?= bullseye
IMAGE_VERSION ?= bookworm-v1.0.0
CONFIG ?= bookworm

TAR_FILE ?= rootfs.tar
ARCH ?= amd64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,18 @@ RUN ln -s /usr/bin/dpkg-split /usr/sbin/dpkg-split && \
RUN apt-get update \
&& apt-get dist-upgrade -y

# Hold required packages to avoid breaking the installation of packages
RUN apt-mark hold apt gnupg adduser passwd libsemanage1 libcap2

# Remove unnecessary packages.
saschagrunert marked this conversation as resolved.
Show resolved Hide resolved
# This list was generated manually by listing the installed packages (`apt list --installed`),
# then running `apt-cache rdepends --installed --no-recommends` to find the "root" packages.
# The root packages were evaluated based on whether they were needed in the container image.
# Several utilities (e.g. ping) were kept for usefulness, but may be removed in later versions.
RUN echo "Yes, do as I say!" | apt-get purge \
bash \
e2fsprogs \
libcap2-bin \
libmount1 \
libsmartcols1 \
libblkid1 \
libss2 \
ncurses-base \
ncurses-bin \
tzdata
RUN dpkg --purge --force-remove-essential \
bash \
e2fsprogs \
libss2 \
libcom-err2 \
libext2fs2 \
logsave \
ncurses-base \
ncurses-bin \
tzdata \
&& apt-get autoremove --purge -y

# No-op stubs replace some unnecessary binaries that may be depended on in the install process (in
# particular we don't run an init process).
Expand Down
7 changes: 3 additions & 4 deletions images/build/debian-base/variants.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
variants:
# Debian 11 - Kubernetes 1.23 and newer
bullseye:
CONFIG: 'bullseye'
IMAGE_VERSION: 'bullseye-v1.4.3'
bookworm:
CONFIG: 'bookworm'
IMAGE_VERSION: 'bookworm-v1.0.0'