containernetworking / plugins

Some reference and example networking plugins, maintained by the CNI team.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

host-device: Move multiple devices into a container

nakabonne opened this issue · comments

Hello, thank you for all of your efforts.

I have a question about the host-device plugin. I would like to add multiple network devices like can0 and can1 into a container, but seems like that plugin allows only one device.

As far as I can tell from source code, it's not so difficult. We just have to add an interface to 100.Result.Interface. My question is if it's reasonable to let host-device support multiple devices.

Thank you.

To add multiple devices you need multiple CNI ADD calls, e.g. one for can0 and then another for can1.

Ah, that makes sense! Thank you for your quick reply!