File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,8 @@ if pgrep -f snap/microk8s > /dev/null; then
2323 fi
2424elif ls $NODE_ROOT /var/lib/rancher/rke2/agent/etc/containerd/config.toml > /dev/null 2>&1 ; then
2525 IS_RKE2_AGENT=true
26- cp $NODE_ROOT /var/lib/rancher/rke2/agent/etc/containerd/config.toml $NODE_ROOT /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
27- CONTAINERD_CONF=/var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
2826elif ls $NODE_ROOT /var/lib/rancher/k3s/agent/etc/containerd/config.toml > /dev/null 2>&1 ; then
2927 IS_K3S=true
30- cp $NODE_ROOT /var/lib/rancher/k3s/agent/etc/containerd/config.toml $NODE_ROOT /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
31- CONTAINERD_CONF=/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
3228elif pgrep -f /var/lib/k0s/bin/kubelet > /dev/null; then
3329 IS_K0S_WORKER=true
3430 CONTAINERD_CONF=/etc/k0s/containerd.d/spin.toml
@@ -67,7 +63,9 @@ mkdir -p $NODE_ROOT$KWASM_DIR/bin/
6763
6864cp /assets/containerd-shim-spin-v2 $NODE_ROOT$KWASM_DIR /bin/
6965
70- if ! grep -q spin $NODE_ROOT$CONTAINERD_CONF ; then
66+ # K3S and RKE2 can detect spin shim themselves, no need to configure
67+ # https://github.com/k3s-io/k3s/pull/9519
68+ if ! ( $IS_K3S || $IS_RKE2_AGENT ) && ! grep -q spin $NODE_ROOT$CONTAINERD_CONF ; then
7169 echo " Adding Spin runtime to containerd"
7270 if grep -q " version = 3" $NODE_ROOT$CONTAINERD_CONF ; then
7371 echo '
You can’t perform that action at this time.
0 commit comments