Documentation ¶
Overview ¶
Package nerdctlnet implements a Gostwire decorator that discovers nerdctl-managed CNI networks and then decorates their corresponding network interfaces. Supported types of nerdctl/CNI networks are: “bridge”. Support for “macvlan” is currently blocked upstream in nerdctl as well the CNI plugins.
In case of “bridge” networks this decorator assigns nerdctl/CNI network names as alias names to the corresponding Linux-kernel bridges and also as a Gostwire-specific label.
This decorator also copies any network labels it finds into the corresponding network.Interface instances in a Gostwire discovery information model.
Index ¶
Constants ¶
const GostwireNetworkNameKey = dockernet.BridgeNameOptionName
GostwireNetworkNameKey defines the label key for storing the nerdctl "Docker" network name of bridge networks.
const NetworkConfigurationsDir = "/etc/cni/net.d"
NetworkConfigurationsGlob specifies the location only of the CNI network configuration list files.
const NetworkConfigurationsGlob = "nerdctl-*.conflist"
NetworkConfigurationsGlob specifies the pattern of the CNI network configuration list files.
Variables ¶
This section is empty.
Functions ¶
func Decorate ¶
func Decorate( ctx context.Context, allnetns network.NetworkNamespaces, allprocs model.ProcessTable, engines []*model.ContainerEngine, )
Decorate decorates bridge network interfaces with alias names that are the names of their corresponding nerdctl-managed CNI "bridge" networks, where applicable (a copy is stored also in the labels in Gostwire's key namespace). Additionally, it copies over any user-defined network labels.
Types ¶
This section is empty.