From 2ed0eeb05aac84a9672fc10779d718ef344f968c Mon Sep 17 00:00:00 2001 From: Joe Kralicky Date: Thu, 23 May 2024 17:51:06 -0400 Subject: [PATCH] Ensure k3s runs as pid 1 in docker This fixes the k3s entrypoint script in the docker compose integration tests to ensure k3s runs as pid 1. This is required when running k3s in docker if the host is using cgroup2. --- integration/clusters/kubernetes/compose.yml | 10 +++++----- integration/tpl/backends/k3s.libsonnet | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/integration/clusters/kubernetes/compose.yml b/integration/clusters/kubernetes/compose.yml index c27344054..53f78fb04 100644 --- a/integration/clusters/kubernetes/compose.yml +++ b/integration/clusters/kubernetes/compose.yml @@ -16,13 +16,13 @@ services: done ' & fi - k3s "$$@" + exec k3s "$$@" - k3s - agent environment: K3S_TOKEN: TOKEN K3S_URL: https://k3s-server:6443 - image: rancher/k3s:${K3S_TAG:-v1.21.14-k3s1} + image: rancher/k3s:${K3S_TAG:-v1.30.0-k3s1} networks: main: aliases: @@ -1003,7 +1003,7 @@ services: END_OF_MANIFEST kubectl apply -f /tmp/manifest.json sleep 30 - image: rancher/k3s:${K3S_TAG:-v1.21.14-k3s1} + image: rancher/k3s:${K3S_TAG:-v1.30.0-k3s1} networks: main: aliases: @@ -1038,7 +1038,7 @@ services: done ' & fi - k3s "$$@" + exec k3s "$$@" - k3s - server - --disable @@ -1056,7 +1056,7 @@ services: - CMD - kubectl - cluster-info - image: rancher/k3s:${K3S_TAG:-v1.21.14-k3s1} + image: rancher/k3s:${K3S_TAG:-v1.30.0-k3s1} networks: main: aliases: diff --git a/integration/tpl/backends/k3s.libsonnet b/integration/tpl/backends/k3s.libsonnet index 42722ff16..329c7cd19 100644 --- a/integration/tpl/backends/k3s.libsonnet +++ b/integration/tpl/backends/k3s.libsonnet @@ -15,7 +15,7 @@ local Command() = done ' & fi - k3s "$$@" + exec k3s "$$@" |||, 'k3s', ]; @@ -30,7 +30,7 @@ local InstallManifest(manifest) = 'kubectl wait --for=condition=available deployment/' + manifest.metadata.name, ] else []); -local k3s_tag = 'v1.21.14-k3s1'; +local k3s_tag = 'v1.30.0-k3s1'; function(idp, manifests) { compose: {