osdn

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 License: Apache-2.0 Imports: 24 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 GetNodeIP added in v1.2.0

func GetNodeIP(node *kapi.Node) (string, error)

func GetPodContainerID added in v1.2.0

func GetPodContainerID(pod *kapi.Pod) string

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

type EventType string
const (
	Added   EventType = "ADDED"
	Deleted EventType = "DELETED"
)

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 NamespaceEvent struct {
	Type      EventType
	Namespace *kapi.Namespace
}

type NetNamespaceEvent added in v1.2.0

type NetNamespaceEvent struct {
	Type         EventType
	NetNamespace *osapi.NetNamespace
}

type NodeEvent added in v1.2.0

type NodeEvent struct {
	Type EventType
	Node *kapi.Node
}

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 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, nodeIP, subnetCIDR string) 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) 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 *Registry) GetNetworkInfo() (*net.IPNet, int, *net.IPNet, error)

func (*Registry) GetPod added in v1.1.5

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

func (*Registry) GetRunningPods added in v1.1.1

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

func (*Registry) GetServices added in v1.1.1

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

func (*Registry) GetServicesForNamespace added in v1.1.1

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

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 *Registry) OnEndpointsUpdate(allEndpoints []kapi.Endpoints)

func (*Registry) PopulatePodsByIP added in v1.2.0

func (registry *Registry) PopulatePodsByIP() error

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<- *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 *Registry) WatchNodes(receiver chan<- *NodeEvent) error

func (*Registry) WatchPods added in v1.1.1

func (registry *Registry) WatchPods() error

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

func (*Registry) WriteNetNamespace added in v1.1.1

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

type ServiceEvent added in v1.2.0

type ServiceEvent struct {
	Type    EventType
	Service *kapi.Service
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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