networkop / meshnet-cni

a (K8s) CNI plugin to create arbitrary virtual network topologies
BSD 3-Clause "New" or "Revised" License
116 stars 27 forks source link

Allow other CRI environments #17

Closed jsimonetti closed 4 years ago

jsimonetti commented 4 years ago

When running this CNI plugin in environments that use a different CRI (such as containerd) instead of the docker CRI, the network namespace argument passed to the CNI plugin is in the form or /var/run/netns/cni-xxxxxx instead of the default /proc/<pid>/ns/net format that docker uses. For meshnetd to be able to query the NetNS, it needs access to the host nodes' /var/run/netns directory.

This change will mount the hosts /var/run/netns directory in the meshnet pods.

Keep in mind that for this to work, the hosts /run directory needs to be mounted rshared or otherwise the changes will not propagate into the meshnet pods.

Signed-off-by: Jeroen Simonetti jeroen@simonetti.nl

networkop commented 4 years ago

thanks a lot. not sure how i missed this for so long.