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.
This commit is contained in:
Joe Kralicky 2024-05-23 17:51:06 -04:00
parent 8269a723ec
commit 2ed0eeb05a
No known key found for this signature in database
GPG key ID: 75C4875F34A9FB79
2 changed files with 7 additions and 7 deletions

View file

@ -16,13 +16,13 @@ services:
done done
' & ' &
fi fi
k3s "$$@" exec k3s "$$@"
- k3s - k3s
- agent - agent
environment: environment:
K3S_TOKEN: TOKEN K3S_TOKEN: TOKEN
K3S_URL: https://k3s-server:6443 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: networks:
main: main:
aliases: aliases:
@ -1003,7 +1003,7 @@ services:
END_OF_MANIFEST END_OF_MANIFEST
kubectl apply -f /tmp/manifest.json kubectl apply -f /tmp/manifest.json
sleep 30 sleep 30
image: rancher/k3s:${K3S_TAG:-v1.21.14-k3s1} image: rancher/k3s:${K3S_TAG:-v1.30.0-k3s1}
networks: networks:
main: main:
aliases: aliases:
@ -1038,7 +1038,7 @@ services:
done done
' & ' &
fi fi
k3s "$$@" exec k3s "$$@"
- k3s - k3s
- server - server
- --disable - --disable
@ -1056,7 +1056,7 @@ services:
- CMD - CMD
- kubectl - kubectl
- cluster-info - cluster-info
image: rancher/k3s:${K3S_TAG:-v1.21.14-k3s1} image: rancher/k3s:${K3S_TAG:-v1.30.0-k3s1}
networks: networks:
main: main:
aliases: aliases:

View file

@ -15,7 +15,7 @@ local Command() =
done done
' & ' &
fi fi
k3s "$$@" exec k3s "$$@"
|||, |||,
'k3s', 'k3s',
]; ];
@ -30,7 +30,7 @@ local InstallManifest(manifest) =
'kubectl wait --for=condition=available deployment/' + manifest.metadata.name, 'kubectl wait --for=condition=available deployment/' + manifest.metadata.name,
] else []); ] else []);
local k3s_tag = 'v1.21.14-k3s1'; local k3s_tag = 'v1.30.0-k3s1';
function(idp, manifests) { function(idp, manifests) {
compose: { compose: {