Tap plugin

This PR adds a plugin to create tap devices.
The plugin adds a tap device to the container.

The plugin has a workaround for a golang netlink library
which does not allow for tap devices with no owner/group
to be created. When no tap owner/group is requested, the
plugin will fall back to using the ip tool for creating
the tap device. A fix to the golang netlink lib is pending.

Signed-off-by: mmirecki <mmirecki@redhat.com>
This commit is contained in:
mmirecki
2022-11-17 16:09:26 +01:00
parent 98e01b7c80
commit 01d0031487
27 changed files with 4351 additions and 0 deletions

2
go.mod
View File

@ -17,6 +17,7 @@ require (
github.com/networkplumbing/go-nft v0.2.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.26.0
github.com/opencontainers/selinux v1.8.2
github.com/safchain/ethtool v0.2.0
github.com/vishvananda/netlink v1.2.1-beta.2
golang.org/x/sys v0.5.0
@ -24,6 +25,7 @@ require (
require (
github.com/Microsoft/go-winio v0.4.17 // indirect
github.com/bits-and-blooms/bitset v1.2.0 // indirect
github.com/containerd/cgroups v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gogo/protobuf v1.3.2 // indirect