osdn

package
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2016 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

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 SetupIptables added in v1.1.1

func SetupIptables(ipt iptables.Interface, clusterNetworkCIDR string) error

func ValidateClusterNetwork added in v1.1.5

func ValidateClusterNetwork(network string, hostSubnetLength int, serviceNetwork string) (*net.IPNet, int, *net.IPNet, error)

Types

type FirewallRule added in v1.1.1

type FirewallRule struct {
	// contains filtered or unexported fields
}

type FlowController added in v1.1.1

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 added in v1.1.1

type OvsController struct {
	Registry *Registry

	HostName string

	VNIDMap map[string]uint
	// contains filtered or unexported fields
}

func (*OvsController) BaseInit added in v1.1.1

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 added in v1.1.4

func (oc *OvsController) GetLocalPods(namespace string) ([]api.Pod, error)

func (*OvsController) StartMaster added in v1.1.1

func (oc *OvsController) StartMaster(clusterNetworkCIDR string, clusterBitsPerSubnet uint, serviceNetworkCIDR string) error

func (*OvsController) StartNode added in v1.1.1

func (oc *OvsController) StartNode(mtu uint) error

func (*OvsController) Stop added in v1.1.1

func (oc *OvsController) Stop()

func (*OvsController) SubnetStartMaster added in v1.1.1

func (oc *OvsController) SubnetStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint) error

func (*OvsController) SubnetStartNode added in v1.1.1

func (oc *OvsController) SubnetStartNode(mtu uint) (bool, error)

func (*OvsController) VnidStartMaster added in v1.1.1

func (oc *OvsController) VnidStartMaster() error

func (*OvsController) VnidStartNode added in v1.1.1

func (oc *OvsController) VnidStartNode() error

func (*OvsController) WaitForPodNetworkReady added in v1.1.1

func (oc *OvsController) WaitForPodNetworkReady() error

type PluginHooks added in v1.1.1

type PluginHooks interface {
	PluginStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint) error
	PluginStartNode(mtu uint) error
	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 NewRegistry(osClient *osclient.Client, kClient *kclient.Client) *Registry

func (*Registry) CreateClusterNetwork added in v1.1.5

func (registry *Registry) CreateClusterNetwork(clusterNetwork *net.IPNet, subnetLength int, serviceNetwork *net.IPNet) error

func (*Registry) CreateSubnet added in v1.1.1

func (registry *Registry) CreateSubnet(nodeName string, sub *osdnapi.Subnet) error

func (*Registry) DeleteNetNamespace added in v1.1.1

func (registry *Registry) DeleteNetNamespace(name string) error

func (*Registry) DeleteSubnet added in v1.1.1

func (registry *Registry) DeleteSubnet(nodeName string) error

func (*Registry) GetClusterNetwork added in v1.1.5

func (registry *Registry) GetClusterNetwork() (*net.IPNet, error)

func (*Registry) GetHostSubnetLength added in v1.1.1

func (registry *Registry) GetHostSubnetLength() (int, error)

func (*Registry) GetNamespaces added in v1.1.1

func (registry *Registry) GetNamespaces() ([]string, string, error)

func (*Registry) GetNetNamespace added in v1.1.1

func (registry *Registry) GetNetNamespace(name string) (osdnapi.NetNamespace, error)

func (*Registry) GetNetNamespaces added in v1.1.1

func (registry *Registry) GetNetNamespaces() ([]osdnapi.NetNamespace, string, error)

func (*Registry) GetNetworkInfo added in v1.1.5

func (registry *Registry) GetNetworkInfo() (*net.IPNet, int, *net.IPNet, error)

func (*Registry) GetNodes added in v1.1.1

func (registry *Registry) GetNodes() ([]osdnapi.Node, string, error)

func (*Registry) GetPod added in v1.1.5

func (registry *Registry) GetPod(nodeName, namespace, podName string) (*osdnapi.Pod, error)

func (*Registry) GetPods added in v1.1.1

func (registry *Registry) GetPods() ([]osdnapi.Pod, string, error)

func (*Registry) GetRunningPods added in v1.1.1

func (registry *Registry) GetRunningPods(nodeName, namespace string) ([]osdnapi.Pod, error)

func (*Registry) GetServices added in v1.1.1

func (registry *Registry) GetServices() ([]osdnapi.Service, string, error)

func (*Registry) GetServicesForNamespace added in v1.1.1

func (registry *Registry) GetServicesForNamespace(namespace string) ([]osdnapi.Service, error)

func (*Registry) GetServicesNetwork added in v1.1.5

func (registry *Registry) GetServicesNetwork() (*net.IPNet, error)

func (*Registry) GetSubnet added in v1.1.1

func (registry *Registry) GetSubnet(nodeName string) (*osdnapi.Subnet, error)

func (*Registry) GetSubnets added in v1.1.1

func (registry *Registry) GetSubnets() ([]osdnapi.Subnet, string, error)

func (*Registry) OnEndpointsUpdate added in v1.1.1

func (registry *Registry) OnEndpointsUpdate(allEndpoints []kapi.Endpoints)

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 *Registry) UpdateClusterNetwork(clusterNetwork *net.IPNet, subnetLength int, serviceNetwork *net.IPNet) error

func (*Registry) WatchNamespaces added in v1.1.1

func (registry *Registry) WatchNamespaces(receiver chan<- *osdnapi.NamespaceEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchNetNamespaces added in v1.1.1

func (registry *Registry) WatchNetNamespaces(receiver chan<- *osdnapi.NetNamespaceEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchNodes added in v1.1.1

func (registry *Registry) WatchNodes(receiver chan<- *osdnapi.NodeEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchPods added in v1.1.1

func (registry *Registry) WatchPods(ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchServices added in v1.1.1

func (registry *Registry) WatchServices(receiver chan<- *osdnapi.ServiceEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WatchSubnets added in v1.1.1

func (registry *Registry) WatchSubnets(receiver chan<- *osdnapi.SubnetEvent, ready chan<- bool, start <-chan string, stop <-chan bool) error

func (*Registry) WriteNetNamespace added in v1.1.1

func (registry *Registry) WriteNetNamespace(name string, id uint) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL