From 6fc74ee1121c8b6f2b3bdb796a6e1f4502e7f682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Sun, 12 Jul 2026 11:53:15 +0200 Subject: [PATCH] tests: reduce k0s host memory footprint on CI runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unlike k3s and rke2, the k0s deployment never trimmed its default stack, so it ran metrics-server, autopilot, etc. in addition to the components the tests actually need. On the free GitHub runners this leaves too little host memory headroom: the large in-guest image pull test launches a 4GB Kata QEMU and, while unpacking the image into trusted block storage, the host OOM-kills QEMU. This surfaces as "ttrpc: closed" / "QEMU exited ... signal: killed", even though the very same test passes on k3s, rke2 and microk8s on the same runner (all of which we already trim). Disable the components the tests don't rely on (metrics-server, autopilot) to bring k0s in line with the other distros, while keeping coredns, kube-proxy/network-provider and konnectivity-server. Signed-off-by: Fabiano FidĂȘncio Assisted-by: Cursor --- tests/gha-run-k8s-common.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/gha-run-k8s-common.sh b/tests/gha-run-k8s-common.sh index d477de6d70..1b5b265027 100644 --- a/tests/gha-run-k8s-common.sh +++ b/tests/gha-run-k8s-common.sh @@ -227,10 +227,22 @@ function deploy_k0s() { curl -sSLf -sSLf https://get.k0s.sh | sudo sh fi + # Disable the k0s components our tests don't rely on, to reduce the host + # memory footprint on the free GitHub runners. Unlike k3s/rke2, k0s ships + # its full default stack; without trimming it, the extra control-plane + # footprint leaves too little headroom and the host OOM-kills the 4GB Kata + # QEMU while it pulls a large image in-guest (test #5), showing up as + # "ttrpc: closed" / "QEMU exited ... signal: killed". + # - metrics-server: not needed by the tests (matches k3s/rke2). + # - autopilot: k0s self-update controller, pointless in CI. + # We keep coredns (DNS), kube-proxy/network-provider (networking) and + # konnectivity-server (apiserver<->kubelet), which pods rely on. + k0s_disable_components="metrics-server,autopilot" + # In this case we explicitly want word splitting when calling k0s # with extra parameters. For CI we set containerd=debug for kata-deploy and runtime debugging. # shellcheck disable=SC2086 - sudo k0s install controller --single --logging=containerd=debug,etcd=info,konnectivity-server=1,kube-apiserver=1,kube-controller-manager=1,kube-scheduler=1,kubelet=1 ${KUBERNETES_EXTRA_PARAMS:-} + sudo k0s install controller --single --disable-components "${k0s_disable_components}" --logging=containerd=debug,etcd=info,konnectivity-server=1,kube-apiserver=1,kube-controller-manager=1,kube-scheduler=1,kubelet=1 ${KUBERNETES_EXTRA_PARAMS:-} # kube-router decided to use :8080 for its metrics, and this seems # to be a change that affected k0s 1.30.0+, leading to kube-router