Documentation ¶
Overview ¶
kvm.go file provides networking supporting functions for kvm flavor
Index ¶
- Constants
- type BridgeNetConf
- type FlannelNetConf
- type ForwardedPort
- type MacVTapNetConf
- type NetConf
- type Networking
- func (e *Networking) GetActiveNetworks() []activeNet
- func (n *Networking) GetForwardableNet() (*activeNet, error)
- func (n *Networking) GetForwardableNetHostIP() (net.IP, error)
- func (n *Networking) GetForwardableNetPodIP() (net.IP, error)
- func (n *Networking) GetIfacesByIP(ifaceIP net.IP) ([]net.Interface, error)
- func (e *Networking) Save() error
- func (n *Networking) Teardown(flavor string, debug bool)
Constants ¶
const ( // Suffix to LocalConfigDir path, where users place their net configs UserNetPathSuffix = "net.d" // Default net path relative to stage1 root DefaultNetPath = "etc/rkt/net.d/99-default.conf" DefaultRestrictedNetPath = "etc/rkt/net.d/99-default-restricted.conf" )
const BuiltinNetPluginsPath = "usr/lib/rkt/plugins/net"
const (
IfNamePattern = "eth%d"
)
const UserNetPluginsPath = "/usr/lib/rkt/plugins/net"
TODO(eyakubovich): make this configurable in rkt.conf
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeNetConf ¶ added in v0.12.0
type FlannelNetConf ¶ added in v0.12.0
type ForwardedPort ¶ added in v0.5.4
ForwardedPort describes a port that will be forwarded (mapped) from the host to the pod
type MacVTapNetConf ¶ added in v0.12.0
type NetConf ¶ added in v0.8.0
NetConf local struct extends cnitypes.NetConf with information about masquerading similar to CNI plugins
type Networking ¶
type Networking struct {
// contains filtered or unexported fields
}
Networking describes the networking details of a pod.
func Load ¶ added in v0.5.4
func Load(podRoot string, podID *types.UUID) (*Networking, error)
Load creates the Networking object from saved state. Assumes the current netns is that of the host.
func Setup ¶
func Setup(podRoot string, podID types.UUID, fps []ForwardedPort, netList common.NetList, localConfig, flavor string, debug bool) (*Networking, error)
Setup creates a new networking namespace and executes network plugins to set up networking. It returns in the new pod namespace
func (*Networking) GetActiveNetworks ¶ added in v0.8.1
func (e *Networking) GetActiveNetworks() []activeNet
GetActiveNetworks returns activeNets to be used as NetDescriptors by plugins, which are required for stage1 executor to run (only for KVM)
func (*Networking) GetForwardableNet ¶ added in v1.6.0
func (n *Networking) GetForwardableNet() (*activeNet, error)
GetForwardableNet iterates through all loaded networks and returns either the first network that has masquerading enabled, or the last network in case there is no masqueraded one, or an error if no network was loaded.
func (*Networking) GetForwardableNetHostIP ¶ added in v1.6.0
func (n *Networking) GetForwardableNetHostIP() (net.IP, error)
GetForwardableNetHostIP uses GetForwardableNet() to determine the default network and then returns the Host's IP of that network.
func (*Networking) GetForwardableNetPodIP ¶ added in v1.6.0
func (n *Networking) GetForwardableNetPodIP() (net.IP, error)
GetForwardableNetPodIP uses GetForwardableNet() to determine the default network and then returns the Pod's IP of that network.
func (*Networking) GetIfacesByIP ¶ added in v1.0.0
GetIfacesByIP searches for and returns the interfaces with the given IP Disregards the subnet mask since not every net.IP object contains On success it will return the list of found interfaces
func (*Networking) Save ¶ added in v0.5.4
func (e *Networking) Save() error
Save writes out the info about active nets for "rkt list" and friends to display
func (*Networking) Teardown ¶
func (n *Networking) Teardown(flavor string, debug bool)
Teardown cleans up a produced Networking object.