Documentation
¶
Index ¶
- Constants
- func SetupIptables(ipt iptables.Interface, clusterNetworkCIDR string) error
- func ValidateClusterNetwork(network string, hostSubnetLength int, serviceNetwork string) (*net.IPNet, int, *net.IPNet, error)
- type FirewallRule
- type FlowController
- type OvsController
- func (oc *OvsController) BaseInit(registry *Registry, flowController FlowController, pluginHooks PluginHooks, ...) error
- func (oc *OvsController) GetLocalPods(namespace string) ([]api.Pod, error)
- func (oc *OvsController) StartMaster(clusterNetworkCIDR string, clusterBitsPerSubnet uint, ...) error
- func (oc *OvsController) StartNode(mtu uint) error
- func (oc *OvsController) Stop()
- func (oc *OvsController) SubnetStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint) error
- func (oc *OvsController) SubnetStartNode(mtu uint) (bool, error)
- func (oc *OvsController) VnidStartMaster() error
- func (oc *OvsController) VnidStartNode() error
- func (oc *OvsController) WaitForPodNetworkReady() error
- type PluginHooks
- type Registry
- func (registry *Registry) CreateClusterNetwork(clusterNetwork *net.IPNet, subnetLength int, serviceNetwork *net.IPNet) error
- func (registry *Registry) CreateSubnet(nodeName string, sub *osdnapi.Subnet) error
- func (registry *Registry) DeleteNetNamespace(name string) error
- func (registry *Registry) DeleteSubnet(nodeName string) error
- func (registry *Registry) GetClusterNetwork() (*net.IPNet, error)
- func (registry *Registry) GetHostSubnetLength() (int, error)
- func (registry *Registry) GetNamespaces() ([]string, string, error)
- func (registry *Registry) GetNetNamespace(name string) (osdnapi.NetNamespace, error)
- func (registry *Registry) GetNetNamespaces() ([]osdnapi.NetNamespace, string, error)
- func (registry *Registry) GetNetworkInfo() (*net.IPNet, int, *net.IPNet, error)
- func (registry *Registry) GetNodes() ([]osdnapi.Node, string, error)
- func (registry *Registry) GetPod(nodeName, namespace, podName string) (*osdnapi.Pod, error)
- func (registry *Registry) GetPods() ([]osdnapi.Pod, string, error)
- func (registry *Registry) GetRunningPods(nodeName, namespace string) ([]osdnapi.Pod, error)
- func (registry *Registry) GetServices() ([]osdnapi.Service, string, error)
- func (registry *Registry) GetServicesForNamespace(namespace string) ([]osdnapi.Service, error)
- func (registry *Registry) GetServicesNetwork() (*net.IPNet, error)
- func (registry *Registry) GetSubnet(nodeName string) (*osdnapi.Subnet, error)
- func (registry *Registry) GetSubnets() ([]osdnapi.Subnet, string, error)
- func (registry *Registry) OnEndpointsUpdate(allEndpoints []kapi.Endpoints)
- func (registry *Registry) SetBaseEndpointsHandler(base pconfig.EndpointsConfigHandler)
- func (registry *Registry) UpdateClusterNetwork(clusterNetwork *net.IPNet, subnetLength int, serviceNetwork *net.IPNet) error
- func (registry *Registry) WatchNamespaces(receiver chan<- *osdnapi.NamespaceEvent, ready chan<- bool, ...) error
- func (registry *Registry) WatchNetNamespaces(receiver chan<- *osdnapi.NetNamespaceEvent, ready chan<- bool, ...) error
- func (registry *Registry) WatchNodes(receiver chan<- *osdnapi.NodeEvent, ready chan<- bool, start <-chan string, ...) error
- func (registry *Registry) WatchPods(ready chan<- bool, start <-chan string, stop <-chan bool) error
- func (registry *Registry) WatchServices(receiver chan<- *osdnapi.ServiceEvent, ready chan<- bool, start <-chan string, ...) error
- func (registry *Registry) WatchSubnets(receiver chan<- *osdnapi.SubnetEvent, ready chan<- bool, start <-chan string, ...) error
- func (registry *Registry) WriteNetNamespace(name string, id uint) error
Constants ¶
View Source
const ( // Maximum VXLAN Network Identifier as per RFC#7348 MaxVNID = ((1 << 24) - 1) // VNID for the admin namespaces AdminVNID = uint(0) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FirewallRule ¶
type FirewallRule struct {
// contains filtered or unexported fields
}
type FlowController ¶
type FlowController interface {
Setup(localSubnetCIDR, clusterNetworkCIDR, serviceNetworkCIDR string, mtu uint) (bool, error)
AddOFRules(nodeIP, nodeSubnetCIDR, localIP string) error
DelOFRules(nodeIP, localIP string) error
AddServiceOFRules(netID uint, IP string, protocol api.ServiceProtocol, port uint) error
DelServiceOFRules(netID uint, IP string, protocol api.ServiceProtocol, port uint) error
}
type OvsController ¶
type OvsController struct {
Registry *Registry
HostName string
VNIDMap map[string]uint
// contains filtered or unexported fields
}
func (*OvsController) BaseInit ¶
func (oc *OvsController) BaseInit(registry *Registry, flowController FlowController, pluginHooks PluginHooks, hostname string, selfIP string) error
Called by plug factory functions to initialize the generic plugin instance
func (*OvsController) GetLocalPods ¶
func (oc *OvsController) GetLocalPods(namespace string) ([]api.Pod, error)
func (*OvsController) StartMaster ¶
func (oc *OvsController) StartMaster(clusterNetworkCIDR string, clusterBitsPerSubnet uint, serviceNetworkCIDR string) error
func (*OvsController) StartNode ¶
func (oc *OvsController) StartNode(mtu uint) error
func (*OvsController) Stop ¶
func (oc *OvsController) Stop()
func (*OvsController) SubnetStartMaster ¶
func (oc *OvsController) SubnetStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint) error
func (*OvsController) SubnetStartNode ¶
func (oc *OvsController) SubnetStartNode(mtu uint) (bool, error)
func (*OvsController) VnidStartMaster ¶
func (oc *OvsController) VnidStartMaster() error
func (*OvsController) VnidStartNode ¶
func (oc *OvsController) VnidStartNode() error
func (*OvsController) WaitForPodNetworkReady ¶
func (oc *OvsController) WaitForPodNetworkReady() error
type PluginHooks ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) CreateClusterNetwork ¶
func (*Registry) CreateSubnet ¶
func (*Registry) DeleteNetNamespace ¶
func (*Registry) DeleteSubnet ¶
func (*Registry) GetClusterNetwork ¶
func (*Registry) GetHostSubnetLength ¶
func (*Registry) GetNamespaces ¶
func (*Registry) GetNetNamespace ¶
func (registry *Registry) GetNetNamespace(name string) (osdnapi.NetNamespace, error)
func (*Registry) GetNetNamespaces ¶
func (registry *Registry) GetNetNamespaces() ([]osdnapi.NetNamespace, string, error)
func (*Registry) GetNetworkInfo ¶
func (*Registry) GetRunningPods ¶
func (*Registry) GetServices ¶
func (*Registry) GetServicesForNamespace ¶
func (*Registry) GetServicesNetwork ¶
func (*Registry) GetSubnets ¶
func (*Registry) OnEndpointsUpdate ¶
func (*Registry) SetBaseEndpointsHandler ¶
func (registry *Registry) SetBaseEndpointsHandler(base pconfig.EndpointsConfigHandler)
FilteringEndpointsConfigHandler implementation
func (*Registry) UpdateClusterNetwork ¶
func (*Registry) WatchNamespaces ¶
func (*Registry) WatchNetNamespaces ¶
func (*Registry) WatchNodes ¶
func (*Registry) WatchServices ¶
func (*Registry) WatchSubnets ¶
Click to show internal directories.
Click to hide internal directories.