Skip to content

release: publish a container image per release - #319

Closed
Moep90 wants to merge 3 commits into
kapicorp:mainfrom
Moep90:ci/release-container-image
Closed

Moep90 wants to merge 3 commits into
kapicorp:mainfrom
Moep90:ci/release-container-image

Conversation

@Moep90

@Moep90 Moep90 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #318. Spec: docs/specs/cli-and-release.md, CLI-63 and a new row under Release assets.

The release workflow gets an image job. It downloads the two Linux archives of the same run, unpacks krab into bin/amd64 and bin/arm64, and builds ghcr.io/kapicorp/krab:<version> for both platforms from the new Dockerfile, so there is no second compile. On a tag it pushes the image and attaches a build provenance attestation (attest-build-provenance with push-to-registry). latest only moves for tags without -. A manual run builds without pushing (CLI-46).

Image contents:

  • debian:trixie-slim pinned by digest, with ca-certificates, git, gnupg and python3.
  • A venv /opt/krab/python with kadet==0.3.2 and jinja2==3.1.6, the BASELINE of pyenv.rs, installed at build time. KRAB_PYTHON points at it, so a compile installs nothing and the root filesystem can be read-only.
  • helm 4.3.2 from its release archive, checked against the .sha256sum from get.helm.sh in a separate stage.
  • User 999 (Argo CD runs config management plugins as that user), entrypoint krab.

.dockerignore limits the context to bin/, LICENSE and README.md. The action pins are the current releases: setup-qemu v4.4.0, setup-buildx v4.4.1, login v4.8.0, build-push v7.4.0. The image is 348 MB.

Checked locally with the amd64 image and the v2.0.0-alpha.7 binary (archive matches SHA256SUMS), running --read-only as uid 999:

  • krab --version, helm version (v4.3.2) and import kadet, jinja2 work.
  • krab compile on three targets of a real Kapitan inventory, covering kadet, helm, jinja2, embedded gpg refs and resolvers.py. Two targets (10 and 24 files) are byte-identical to kapitan compile. The third differs in one file because krab drops a container securityContext the kadet generator writes. That is a parity bug, not an image problem, filed as [parity]: kadet output loses a container securityContext that the generator writes into pod_spec.containers #320.
  • zizmor finds nothing. actionlint only reports the existing sha256sum * line in the release job.

Not checked: the arm64 build (QEMU in CI) and the push to ghcr.io. On the first push the package may be created private and need to be made public once.

Signed-off-by: Moep90 <3042152+Moep90@users.noreply.github.com>
Signed-off-by: Moep90 <3042152+Moep90@users.noreply.github.com>
…rp#318)

Signed-off-by: Moep90 <3042152+Moep90@users.noreply.github.com>
@Moep90

Moep90 commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing this. The container image will be built in a kadet-hub fork instead, the same way as ghcr.io/kadet-hub/kapitan:next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: packaging Crates, release binaries, CI documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release: publish a container image per release

1 participant