Skip to content

Commit ba26c4b

Browse files
committed
node-installer: detect containerd config version instead of $IS_K3S
Signed-off-by: Shiroki Satsuki <[email protected]> # Conflicts: # node-installer/script/installer.sh
1 parent 11e2e12 commit ba26c4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

node-installer/script/installer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ cp /assets/containerd-shim-spin-v2 $NODE_ROOT$KWASM_DIR/bin/
6969

7070
if ! grep -q spin $NODE_ROOT$CONTAINERD_CONF; then
7171
echo "Adding Spin runtime to containerd"
72-
if $IS_K3S; then
72+
if grep -q "version = 3" $NODE_ROOT$CONTAINERD_CONF; then
7373
echo '
7474
[plugins."io.containerd.cri.v1.runtime".containerd.runtimes."spin"]
7575
runtime_type = "'$KWASM_DIR'/bin/containerd-shim-spin-v2"
@@ -88,7 +88,7 @@ fi
8888
# configure SystemdCgroup
8989
if ! grep -q 'runtimes.spin.options' $NODE_ROOT$CONTAINERD_CONF && [ "$SYSTEMD_CGROUP" = "true" ]; then
9090
echo "Setting SystemdCgroup to $SYSTEMD_CGROUP in Spin containerd configuration"
91-
if $IS_K3S; then
91+
if grep -q "version = 3" $NODE_ROOT$CONTAINERD_CONF; then
9292
echo '
9393
[plugins."io.containerd.cri.v1.runtime".containerd.runtimes.spin.options]
9494
SystemdCgroup = '$SYSTEMD_CGROUP'

0 commit comments

Comments
 (0)