Documentation ¶
Overview ¶
Package common contains the OpenShift SDN code that is shared between master, node, and proxy
Index ¶
- func ClusterNetworkListContains(clusterNetworks []ClusterNetwork, ipaddr net.IP) (*net.IPNet, bool)
- func ClusterNetworkToString(n *networkapi.ClusterNetwork) string
- func HostSubnetToString(subnet *networkapi.HostSubnet) string
- func InformerFuncs(objType runtime.Object, addOrUpdateFunc InformerAddOrUpdateFunc, ...) kcache.ResourceEventHandlerFuncs
- type ClusterNetwork
- type DNS
- type EgressDNS
- func (e *EgressDNS) Add(policy networkapi.EgressNetworkPolicy)
- func (e *EgressDNS) Delete(policy networkapi.EgressNetworkPolicy)
- func (e *EgressDNS) GetIPs(policy networkapi.EgressNetworkPolicy, dnsName string) []net.IP
- func (e *EgressDNS) GetMinQueryTime() (time.Time, ktypes.UID, string, bool)
- func (e *EgressDNS) GetNetCIDRs(policy networkapi.EgressNetworkPolicy, dnsName string) []net.IPNet
- func (e *EgressDNS) Sync()
- func (e *EgressDNS) Update(policyUID ktypes.UID) (error, bool)
- type EgressDNSUpdate
- type EgressIPTracker
- func (eit *EgressIPTracker) DeleteNetNamespaceEgress(vnid uint32)
- func (eit *EgressIPTracker) Ping(ip string, timeout time.Duration) bool
- func (eit *EgressIPTracker) ReallocateEgressIPs() map[string][]string
- func (eit *EgressIPTracker) SetNodeOffline(nodeIP string, offline bool)
- func (eit *EgressIPTracker) Start(hostSubnetInformer networkinformers.HostSubnetInformer, ...)
- func (eit *EgressIPTracker) UpdateHostSubnetEgress(hs *networkapi.HostSubnet)
- func (eit *EgressIPTracker) UpdateNetNamespaceEgress(netns *networkapi.NetNamespace)
- type EgressIPWatcher
- type InformerAddOrUpdateFunc
- type InformerDeleteFunc
- type NetworkInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterNetworkToString ¶
func ClusterNetworkToString(n *networkapi.ClusterNetwork) string
func HostSubnetToString ¶
func HostSubnetToString(subnet *networkapi.HostSubnet) string
func InformerFuncs ¶
func InformerFuncs(objType runtime.Object, addOrUpdateFunc InformerAddOrUpdateFunc, deleteFunc InformerDeleteFunc) kcache.ResourceEventHandlerFuncs
Types ¶
type ClusterNetwork ¶
type EgressDNS ¶
type EgressDNS struct { // Report changes when there are dns updates Updates chan EgressDNSUpdate // contains filtered or unexported fields }
func NewEgressDNS ¶
func NewEgressDNS() *EgressDNS
func (*EgressDNS) Add ¶
func (e *EgressDNS) Add(policy networkapi.EgressNetworkPolicy)
func (*EgressDNS) Delete ¶
func (e *EgressDNS) Delete(policy networkapi.EgressNetworkPolicy)
func (*EgressDNS) GetIPs ¶
func (e *EgressDNS) GetIPs(policy networkapi.EgressNetworkPolicy, dnsName string) []net.IP
func (*EgressDNS) GetMinQueryTime ¶
func (*EgressDNS) GetNetCIDRs ¶
func (e *EgressDNS) GetNetCIDRs(policy networkapi.EgressNetworkPolicy, dnsName string) []net.IPNet
type EgressDNSUpdate ¶
type EgressIPTracker ¶
func NewEgressIPTracker ¶
func NewEgressIPTracker(watcher EgressIPWatcher) *EgressIPTracker
func (*EgressIPTracker) DeleteNetNamespaceEgress ¶
func (eit *EgressIPTracker) DeleteNetNamespaceEgress(vnid uint32)
func (*EgressIPTracker) Ping ¶
func (eit *EgressIPTracker) Ping(ip string, timeout time.Duration) bool
Ping a node and return whether or not it is online. We do this by trying to open a TCP connection to the "discard" service (port 9); if the node is offline, the attempt will time out with no response (and we will return false). If the node is online then we presumably will get a "connection refused" error; the code below assumes that anything other than timing out indicates that the node is online.
func (*EgressIPTracker) ReallocateEgressIPs ¶
func (eit *EgressIPTracker) ReallocateEgressIPs() map[string][]string
ReallocateEgressIPs returns a map from Node name to array-of-Egress-IP for all auto-allocated egress IPs
func (*EgressIPTracker) SetNodeOffline ¶
func (eit *EgressIPTracker) SetNodeOffline(nodeIP string, offline bool)
func (*EgressIPTracker) Start ¶
func (eit *EgressIPTracker) Start(hostSubnetInformer networkinformers.HostSubnetInformer, netNamespaceInformer networkinformers.NetNamespaceInformer)
func (*EgressIPTracker) UpdateHostSubnetEgress ¶
func (eit *EgressIPTracker) UpdateHostSubnetEgress(hs *networkapi.HostSubnet)
func (*EgressIPTracker) UpdateNetNamespaceEgress ¶
func (eit *EgressIPTracker) UpdateNetNamespaceEgress(netns *networkapi.NetNamespace)
type EgressIPWatcher ¶
type InformerAddOrUpdateFunc ¶
type InformerDeleteFunc ¶
type InformerDeleteFunc func(interface{})
type NetworkInfo ¶
type NetworkInfo struct { ClusterNetworks []ClusterNetwork ServiceNetwork *net.IPNet VXLANPort uint32 }
func GetNetworkInfo ¶
func GetNetworkInfo(networkClient networkclient.Interface) (*NetworkInfo, error)
func ParseNetworkInfo ¶
func ParseNetworkInfo(clusterNetwork []networkapi.ClusterNetworkEntry, serviceNetwork string, vxlanPort *uint32) (*NetworkInfo, error)
func (*NetworkInfo) CheckClusterObjects ¶
func (ni *NetworkInfo) CheckClusterObjects(subnets []networkapi.HostSubnet, pods []kapi.Pod, services []kapi.Service) error
func (*NetworkInfo) CheckHostNetworks ¶
func (ni *NetworkInfo) CheckHostNetworks(hostIPNets []*net.IPNet) error
func (*NetworkInfo) ValidateNodeIP ¶
func (ni *NetworkInfo) ValidateNodeIP(nodeIP string) error
Click to show internal directories.
Click to hide internal directories.