Documentation ¶
Overview ¶
Package ipam is responsible for IP addresses management
Index ¶
- type Config
- type IPAM
- func (i *IPAM) HostID() uint8
- func (i *IPAM) HostIPAddress(hostID uint8) (net.IP, error)
- func (i *IPAM) HostIPNetwork(hostID uint8) (*net.IPNet, error)
- func (i *IPAM) NextPodIP(podID string) (net.IP, error)
- func (i *IPAM) OtherHostPodNetwork(hostID uint8) *net.IPNet
- func (i *IPAM) OtherHostVSwitchNetwork(hostID uint8) *net.IPNet
- func (i *IPAM) PodGatewayIP() net.IP
- func (i *IPAM) PodNetwork() *net.IPNet
- func (i *IPAM) PodSubnet() *net.IPNet
- func (i *IPAM) ReleasePodIP(podID string) error
- func (i *IPAM) VEthHostEndIP() net.IP
- func (i *IPAM) VEthVPPEndIP() net.IP
- func (i *IPAM) VSwitchNetwork() *net.IPNet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PodSubnetCIDR string // subnet used for all pods across all nodes PodNetworkPrefixLen uint8 // prefix length of subnet used for all pods of 1 host node (pod network = pod subnet for one 1 host node) VSwitchSubnetCIDR string // subnet used in each host for vswitch-to-its-host connection VSwitchNetworkPrefixLen uint8 // prefix length of subnet used for vswitch-to-its-host connection on 1 host node (VSwitch network = VSwitch subnet for one 1 host node) HostNodeSubnetCidr string // subnet used for all hosts node referencing IP addresses }
Config is configuration for IPAM module
type IPAM ¶
type IPAM struct {
// contains filtered or unexported fields
}
IPAM represents the basic Contiv IPAM module.
func (*IPAM) HostIPAddress ¶
HostIPAddress computes IP address of host node based on host id
func (*IPAM) HostIPNetwork ¶
HostIPNetwork computes host node network with IP address of host node based on provided host id
func (*IPAM) NextPodIP ¶
NextPodIP returns next available pod IP address and remembers that this IP is meant to be used for pod with pod id <podID>
func (*IPAM) OtherHostPodNetwork ¶
OtherHostPodNetwork returns pod network for other host identified by hostID.
func (*IPAM) OtherHostVSwitchNetwork ¶
OtherHostVSwitchNetwork returns vswitch network used to connect vswitch to other host identified by hostID.
func (*IPAM) PodGatewayIP ¶
PodGatewayIP returns gateway IP address for the pod network.
func (*IPAM) PodNetwork ¶
PodNetwork returns pod network for current host (given by hostID given at IPAM creation)
func (*IPAM) PodSubnet ¶
PodSubnet returns pod subnet ("network_address/prefix_length") that is base subnet for all pods of all hosts.
func (*IPAM) ReleasePodIP ¶
ReleasePodIP releases the pod IP address remembered by pod ID string, so that it can be reused by the next pods.
func (*IPAM) VEthHostEndIP ¶
VEthHostEndIP provides (for host given to IPAM) the IPv4 address for virtual ethernet's host end point
func (*IPAM) VEthVPPEndIP ¶
VEthVPPEndIP provides (for host given to IPAM) the IPv4 address for virtual ethernet's VPP end point
func (*IPAM) VSwitchNetwork ¶
VSwitchNetwork returns vswitch network used to connect vswitch to its host (given by hostID given at IPAM creation)