Skip to content

Init pm#2088

Open
AntonFomichev-Flant wants to merge 13 commits into
mainfrom
feat/pm
Open

Init pm#2088
AntonFomichev-Flant wants to merge 13 commits into
mainfrom
feat/pm

Conversation

@AntonFomichev-Flant

@AntonFomichev-Flant AntonFomichev-Flant commented Mar 10, 2026

Copy link
Copy Markdown

Description

Migrate DVP runtime images to base/distroless + Flant package manager (pm)

Why do we need it, and what problem does it solve?

Previously, every runtime dependency was compiled from source inside dedicated images/packages/* build recipes — a slow, fragile approach that required maintaining custom werf stages for each library. Any version bump meant touching multiple places across the repository.

The Flant package manager (pm) solves this by treating dependencies as OCI artifacts: pm install resolves the full dependency graph, verifies content digests, and places binaries and libraries in a single deterministic operation. No more hand-crafted build stages per library, no more ABI surprises between build and runtime.

Migrated

The following packages — previously built from source as individual images/packages/* werf stages — are now delivered via pm install:

  • acl, bzip2, cyrus-sasl2, dmidecode, dtc, e2fsprogs, file, gcc, glib2
  • glibc, gnutls, keyutils, krb5, libaio, libattr, libaudit, libbrotli, libbsd
  • libburn, libcap, libcap-ng, libcapstone, libcurl, libffi, libfuse2, libfuse3, libgcrypt
  • libgmp, libgpg-error, libgsasl, libidn, libidn2, libisoburn, libisofs, libjansson4, libjson-c5
  • libjson-glib, libmd, libmnl, libnbd, libnftnl, libnl3, libntlm, libpixman, libpng
  • libpsl, libqpl, libseccomp, libslirp, libssh, libssh2, libtasn1, libtirpc, libtpms
  • libunistring, liburing, libuserspace-rcu, libvirt, libxcrypt, libxkbcommon, libxml2, linux-pam, lvm2
  • lz4, lzo, multipath-tools, nbdkit, ncurses, nettle, nftables, nghttp2, nghttp3
  • ngtcp2, numactl, openldap, openssl, p11-kit, pcre2, rdma-core, readline, selinux
  • snappy, swtpm, systemd, ubdsrv, util-linux, xz, zlib, zstd

Switching to base/distroless as the final base image aligns the runtime environment with the build environment, eliminating the class of issues where a binary compiled on ALT would behave differently at runtime.

What is the expected result?

The following final-stage images are now based on base/distroless with runtime dependencies managed via pm install:

  • virt-launcher
  • virt-handler
  • dvcr
  • dvcr-importer
  • dvcr-uploader
  • pvc-importer

Additionally, the build stages for virt-artifact and pvc-artifact have been migrated from builder/golang-alt-1.25 to builder/golang-1.25, aligning the glibc version across build and runtime environments.

Image sizes reduced by ~91 MB per image (e.g. virt-launcher: 279 MB → 187 MB).

images/packages/ legacy build recipes and version pins in base-images-pins.yml are transitional — see TODO below.

TODO (follow-up)

  1. images/packages/ migration — legacy per-library build recipes are still present and should be removed once pm fully covers all runtime dependencies.

  2. Builder stages migration — the following build-stage images still use builder/golang-alt-1.25 and are candidates for migration:

    • dvcr-artifact — uses CGO, needs builder/golang-1.25 (gcc + go + pm)
    • bounder, hooks, kube-api-rewriter, pre-delete-hook, virtualization-artifact, virtualization-dra, vm-route-forge — pure Go, no CGO; should be migrated to builder/golang-1.25
    • edk2 remains on ALT intentionally — requires a full native toolchain (clang with BPF target, acpica, nasm) not yet available in container-factory
  3. Remove version pinsbase-images-pins.yml currently pins base/distroless and builder/distroless to specific container-factory digests. In the ideal world there should be no manual pins: the module should track container-factory releases automatically. The pins are a transitional measure.

  4. Go 1.26 upgradebuilder/golang-1.26 is already available in container-factory. Once build stages are fully migrated off ALT, upgrading to 1.26 is a straightforward one-line change per image.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: images
type: feature
summary: "Migrate runtime images to base/distroless + pm install, replacing per-library build recipes and reducing image sizes by ~91 MB."

@AntonFomichev-Flant AntonFomichev-Flant added this to the v1.8.0 milestone Mar 10, 2026
@AntonFomichev-Flant AntonFomichev-Flant force-pushed the feat/pm branch 14 times, most recently from 1e15bda to 854cedb Compare March 11, 2026 12:46
@AntonFomichev-Flant AntonFomichev-Flant force-pushed the feat/pm branch 4 times, most recently from 8f84fca to ced3603 Compare March 12, 2026 06:08
@AntonFomichev-Flant AntonFomichev-Flant marked this pull request as ready for review March 13, 2026 09:13
@flant-pinegal flant-pinegal force-pushed the feat/pm branch 3 times, most recently from 8b0cfb8 to 606dcd4 Compare March 26, 2026 08:11
@flant-pinegal flant-pinegal added the e2e/run Run e2e test on cluster of PR author label Mar 26, 2026
@flant-pinegal flant-pinegal self-assigned this Mar 26, 2026
@ArtemFedorov-Flant ArtemFedorov-Flant force-pushed the feat/pm branch 9 times, most recently from 662ba47 to 4cf2701 Compare July 9, 2026 11:28
@ArtemFedorov-Flant ArtemFedorov-Flant force-pushed the feat/pm branch 3 times, most recently from 053e272 to 6d4953a Compare July 9, 2026 13:23
…tall

Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
…helper

Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
…-artifact BPF deps

Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
…golang-1.25

Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
…arrives in base-images

Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
…pf_bridge.o compilation

Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
…golang-1.25

Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
@ArtemFedorov-Flant ArtemFedorov-Flant marked this pull request as ready for review July 13, 2026 15:45
Signed-off-by: Artem Fedorov <artem.fedorov@flant.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants