Documentation
¶
Index ¶
- Constants
- func GetNodeIP(node *kapi.Node) (string, error)
- func GetPodContainerID(pod *kapi.Pod) string
- func HostSubnetToString(subnet *osapi.HostSubnet) string
- func SetupIptables(ipt iptables.Interface, clusterNetworkCIDR string) error
- func ValidateClusterNetwork(network string, hostSubnetLength int, serviceNetwork string) (*net.IPNet, int, *net.IPNet, error)
- type EventType
- type FirewallRule
- type HostSubnetEvent
- type NamespaceEvent
- type NetNamespaceEvent
- type NodeEvent
- type OsdnController
- func (oc *OsdnController) BaseInit(registry *Registry, pluginHooks PluginHooks, multitenant bool, hostname string, ...) error
- func (oc *OsdnController) GetLocalPods(namespace string) ([]kapi.Pod, error)
- func (oc *OsdnController) StartMaster(clusterNetworkCIDR string, clusterBitsPerSubnet uint, ...) error
- func (oc *OsdnController) StartNode(mtu uint) error
- func (oc *OsdnController) SubnetStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint) error
- func (oc *OsdnController) SubnetStartNode(mtu uint) (bool, error)
- func (oc *OsdnController) VnidStartMaster() error
- func (oc *OsdnController) VnidStartNode() error
- func (oc *OsdnController) WaitForPodNetworkReady() error
- type PluginHooks
- type Registry
- func (registry *Registry) CreateClusterNetwork(clusterNetwork *net.IPNet, subnetLength int, serviceNetwork *net.IPNet) error
- func (registry *Registry) CreateSubnet(nodeName, nodeIP, subnetCIDR string) (*osapi.HostSubnet, 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) GetNetNamespace(name string) (*osapi.NetNamespace, error)
- func (registry *Registry) GetNetNamespaces() ([]osapi.NetNamespace, error)
- func (registry *Registry) GetNetworkInfo() (*net.IPNet, int, *net.IPNet, error)
- func (registry *Registry) GetPod(nodeName, namespace, podName string) (*kapi.Pod, error)
- func (registry *Registry) GetRunningPods(nodeName, namespace string) ([]kapi.Pod, error)
- func (registry *Registry) GetServices() ([]kapi.Service, error)
- func (registry *Registry) GetServicesForNamespace(namespace string) ([]kapi.Service, error)
- func (registry *Registry) GetSubnet(nodeName string) (*osapi.HostSubnet, error)
- func (registry *Registry) GetSubnets() ([]osapi.HostSubnet, error)
- func (registry *Registry) OnEndpointsUpdate(allEndpoints []kapi.Endpoints)
- func (registry *Registry) PopulatePodsByIP() error
- 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<- *NamespaceEvent) error
- func (registry *Registry) WatchNetNamespaces(receiver chan<- *NetNamespaceEvent) error
- func (registry *Registry) WatchNodes(receiver chan<- *NodeEvent) error
- func (registry *Registry) WatchPods() error
- func (registry *Registry) WatchServices(receiver chan<- *ServiceEvent) error
- func (registry *Registry) WatchSubnets(receiver chan<- *HostSubnetEvent) error
- func (registry *Registry) WriteNetNamespace(name string, id uint) error
- type ServiceEvent
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 ¶
func GetPodContainerID ¶ added in v1.2.0
func HostSubnetToString ¶
func HostSubnetToString(subnet *osapi.HostSubnet) string
func SetupIptables ¶ added in v1.1.1
Types ¶
type FirewallRule ¶ added in v1.1.1
type FirewallRule struct {
// contains filtered or unexported fields
}
type HostSubnetEvent ¶ added in v1.2.0
type HostSubnetEvent struct {
Type EventType
HostSubnet *osapi.HostSubnet
}
type NamespaceEvent ¶ added in v1.2.0
type NetNamespaceEvent ¶ added in v1.2.0
type NetNamespaceEvent struct {
Type EventType
NetNamespace *osapi.NetNamespace
}
type OsdnController ¶ added in v1.2.0
type OsdnController struct {
Registry *Registry
HostName string
VNIDMap map[string]uint
// contains filtered or unexported fields
}
func (*OsdnController) BaseInit ¶ added in v1.2.0
func (oc *OsdnController) BaseInit(registry *Registry, pluginHooks PluginHooks, multitenant bool, hostname string, selfIP string) error
Called by plug factory functions to initialize the generic plugin instance
func (*OsdnController) GetLocalPods ¶ added in v1.2.0
func (oc *OsdnController) GetLocalPods(namespace string) ([]kapi.Pod, error)
func (*OsdnController) StartMaster ¶ added in v1.2.0
func (oc *OsdnController) StartMaster(clusterNetworkCIDR string, clusterBitsPerSubnet uint, serviceNetworkCIDR string) error
func (*OsdnController) StartNode ¶ added in v1.2.0
func (oc *OsdnController) StartNode(mtu uint) error
func (*OsdnController) SubnetStartMaster ¶ added in v1.2.0
func (oc *OsdnController) SubnetStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint) error
func (*OsdnController) SubnetStartNode ¶ added in v1.2.0
func (oc *OsdnController) SubnetStartNode(mtu uint) (bool, error)
func (*OsdnController) VnidStartMaster ¶ added in v1.2.0
func (oc *OsdnController) VnidStartMaster() error
func (*OsdnController) VnidStartNode ¶ added in v1.2.0
func (oc *OsdnController) VnidStartNode() error
func (*OsdnController) WaitForPodNetworkReady ¶ added in v1.2.0
func (oc *OsdnController) WaitForPodNetworkReady() error
type PluginHooks ¶ added in v1.1.1
type PluginHooks interface {
PluginStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint) error
PluginStartNode(mtu uint) error
SetupSDN(localSubnetCIDR, clusterNetworkCIDR, serviceNetworkCIDR string, mtu uint) (bool, error)
AddHostSubnetRules(subnet *osapi.HostSubnet)
DeleteHostSubnetRules(subnet *osapi.HostSubnet)
AddServiceRules(service *kapi.Service, netID uint)
DeleteServiceRules(service *kapi.Service)
UpdatePod(namespace string, name string, id kubetypes.DockerID) error
}
type Registry ¶ added in v1.1.1
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶ added in v1.1.1
func (*Registry) CreateClusterNetwork ¶ added in v1.1.5
func (*Registry) CreateSubnet ¶ added in v1.1.1
func (registry *Registry) CreateSubnet(nodeName, nodeIP, subnetCIDR string) (*osapi.HostSubnet, error)
func (*Registry) DeleteNetNamespace ¶ added in v1.1.1
func (*Registry) DeleteSubnet ¶ added in v1.1.1
func (*Registry) GetClusterNetwork ¶ added in v1.1.5
func (*Registry) GetNetNamespace ¶ added in v1.1.1
func (registry *Registry) GetNetNamespace(name string) (*osapi.NetNamespace, error)
func (*Registry) GetNetNamespaces ¶ added in v1.1.1
func (registry *Registry) GetNetNamespaces() ([]osapi.NetNamespace, error)
func (*Registry) GetNetworkInfo ¶ added in v1.1.5
func (*Registry) GetRunningPods ¶ added in v1.1.1
func (*Registry) GetServices ¶ added in v1.1.1
func (*Registry) GetServicesForNamespace ¶ added in v1.1.1
func (*Registry) GetSubnet ¶ added in v1.1.1
func (registry *Registry) GetSubnet(nodeName string) (*osapi.HostSubnet, error)
func (*Registry) GetSubnets ¶ added in v1.1.1
func (registry *Registry) GetSubnets() ([]osapi.HostSubnet, error)
func (*Registry) OnEndpointsUpdate ¶ added in v1.1.1
func (*Registry) PopulatePodsByIP ¶ added in v1.2.0
func (*Registry) SetBaseEndpointsHandler ¶ added in v1.1.1
func (registry *Registry) SetBaseEndpointsHandler(base pconfig.EndpointsConfigHandler)
FilteringEndpointsConfigHandler implementation
func (*Registry) UpdateClusterNetwork ¶ added in v1.1.5
func (*Registry) WatchNamespaces ¶ added in v1.1.1
func (registry *Registry) WatchNamespaces(receiver chan<- *NamespaceEvent) error
func (*Registry) WatchNetNamespaces ¶ added in v1.1.1
func (registry *Registry) WatchNetNamespaces(receiver chan<- *NetNamespaceEvent) error
func (*Registry) WatchNodes ¶ added in v1.1.1
func (*Registry) WatchServices ¶ added in v1.1.1
func (registry *Registry) WatchServices(receiver chan<- *ServiceEvent) error
func (*Registry) WatchSubnets ¶ added in v1.1.1
func (registry *Registry) WatchSubnets(receiver chan<- *HostSubnetEvent) error
type ServiceEvent ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.