orange-cloudfoundry / k3s-wrapper-boshrelease

k3s wrapper scripts bosh release
Apache License 2.0
2 stars 2 forks source link

Make CSI plugins work, some improvements #69

Open kinjelom opened 3 weeks ago

kinjelom commented 3 weeks ago

Kubelet root directory fix

Kubelet ignores the root-dir argument and creates the socket at: /var/lib/kubelet/device-plugins/=kubelet.sock https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-implementation Therefore, we mount /var/lib/kubelet to the BOSH data directory and keep it unchanged.

This is the only way I've found to make the CSI plugins work.

Switch to Using network.target in Systemd

An error in my deployment indicated that the systemd unit sys-subsystem-net-devices-eth0.device does not exist. In systemd, network devices are not always available as .device units. Instead, you can use a more general dependency like network.target, which ensures that network services are available. This change allows the service to start once the network is properly configured, without relying on a specific device unit that may not be present.

Other Changes

I introduced the k3s-utils package to share functions between the server and agent jobs (DRY) and cleaned up the ERB code.