From eb8764866356a13171fe44587e8b1beab87e30ca Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 31 May 2026 20:44:22 +0200 Subject: [PATCH 1/2] new(k0sproject.io/k0s): zero-deps Kubernetes distribution Add a recipe for k0s, k0sproject's single-binary CNCF Kubernetes distribution. Built from source via the upstream Makefile with EMBEDDED_BINS_BUILDMODE=none (pantry CI has no Docker daemon to run the Docker-driven build of embedded kubelet/etcd/containerd/runc/kine/ konnectivity components). VERSION is passed explicitly because the Makefile would otherwise call `git describe --tags`, which fails inside a tarball checkout. Restricted to linux/x86-64 and linux/aarch64; the upstream Makefile pins TARGET_OS=linux. Co-Authored-By: Claude Opus 4.7 --- projects/k0sproject.io/k0s/package.yml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 projects/k0sproject.io/k0s/package.yml diff --git a/projects/k0sproject.io/k0s/package.yml b/projects/k0sproject.io/k0s/package.yml new file mode 100644 index 0000000000..31c8b5ba5b --- /dev/null +++ b/projects/k0sproject.io/k0s/package.yml @@ -0,0 +1,38 @@ +distributable: + url: https://github.com/k0sproject/k0s/archive/refs/tags/{{version.tag}}.tar.gz + strip-components: 1 + +versions: + github: k0sproject/k0s + ignore: + - /-(rc|alpha|beta)/ + +# k0s is Linux-only: the Makefile defaults TARGET_OS to linux and the project +# targets Linux nodes. macOS is not a supported build/run platform upstream. +platforms: + - linux/x86-64 + - linux/aarch64 + +build: + dependencies: + go.dev: '*' + gnu.org/make: '*' + gnu.org/coreutils: '*' + gnu.org/findutils: '*' + script: + # EMBEDDED_BINS_BUILDMODE=none avoids the Docker-based build of the embedded + # kubelet/etcd/containerd/runc/kine/konnectivity components (pantry CI has + # no Docker). The resulting k0s binary is the same CLI but without the bundled + # third-party binaries; operators provide them out of band (e.g. via airgap + # bundle or system packages). + # VERSION must be passed explicitly: the upstream Makefile uses + # `git describe --tags` to derive it, which fails inside a tarball checkout. + - make build EMBEDDED_BINS_BUILDMODE=none VERSION={{version.tag}} + - install -D -m755 k0s {{prefix}}/bin/k0s + +provides: + - bin/k0s + +test: + - k0s version 2>&1 | grep '{{version.tag}}' + - k0s --help 2>&1 | grep -i 'k0s' From c7ebc72711b748ea004f44e7b240ebb93899ddea Mon Sep 17 00:00:00 2001 From: tannevaled Date: Mon, 1 Jun 2026 07:58:55 +0200 Subject: [PATCH 2/2] fix(k0s): strip +k0s.N build-metadata for version parsing --- projects/k0sproject.io/k0s/package.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/k0sproject.io/k0s/package.yml b/projects/k0sproject.io/k0s/package.yml index 31c8b5ba5b..9c166cfcf1 100644 --- a/projects/k0sproject.io/k0s/package.yml +++ b/projects/k0sproject.io/k0s/package.yml @@ -4,6 +4,13 @@ distributable: versions: github: k0sproject/k0s + # Upstream tags use SemVer build-metadata: `v1.35.4+k0s.0`. libpkgx's + # version parser rejects build-metadata (`not-found: version` in + # CI run 26721224126). Strip the `+k0s.N` suffix so the version + # parses as plain `1.35.4`; the URL still uses {{version.tag}} + # which retains the original raw tag. + strip: + - /\+k0s\.\d+$/ ignore: - /-(rc|alpha|beta)/