Skip to content

Commit

Permalink
Use a hardlink for containerd.sock
Browse files Browse the repository at this point in the history
Symlinks are not visible inside the plugin container
  • Loading branch information
jpc committed Mar 8, 2022
1 parent fe7a1bd commit fa00ffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion k8s-socketcan-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
- -c
- chroot /root/ modprobe vcan || { chroot /root/ apt-get install -y linux-modules-extra-$(uname -r) && chroot /root/ modprobe vcan; } && echo Succesfully installed and loaded the vcan kernel module;
chroot /root/ mknod /var/run/k8s-socketcan/fakedev b 1 1 && echo Succesfully created the /var/run/k8s-socketcan/fakedev device;
for path in /var/run/containerd/containerd.sock /var/snap/microk8s/common/run/containerd.sock /run/k3s/containerd/containerd.sock; do [ -S /root/$path ] && ln -sfn $sock /root/var/run/k8s-socketcan/containerd.sock && echo "Found containerd socket in $path" && break; done
for path in /var/run/containerd/containerd.sock /var/snap/microk8s/common/run/containerd.sock /run/k3s/containerd/containerd.sock; do [ -S /root/$path ] && chroot /root/ ln -fn $path /var/run/k8s-socketcan/containerd.sock && echo "Found containerd socket in $path" && break; done;
securityContext:
privileged: true
capabilities:
Expand Down

0 comments on commit fa00ffe

Please sign in to comment.