plugin

package
v1.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2016 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// rule versioning; increment each time flow rules change
	VERSION        = 1
	VERSION_TABLE  = "table=253"
	VERSION_ACTION = "actions=note:"

	BR    = "br0"
	TUN   = "tun0"
	VXLAN = "vxlan0"

	VXLAN_PORT = "4789"
)

Variables

This section is empty.

Functions

func RunEventQueue

func RunEventQueue(client kcache.Getter, resourceName ResourceName, process ProcessEventFunc)

Run event queue for the given resource

func RunLocalPodsEventQueue

func RunLocalPodsEventQueue(client kcache.Getter, nodeName string, process ProcessEventFunc)

func StartMaster

func StartMaster(networkConfig osconfigapi.MasterNetworkConfig, osClient *osclient.Client, kClient *kclient.Client) error

Types

type EventQueue

type EventQueue struct {
	*cache.DeltaFIFO
	// contains filtered or unexported fields
}

EventQueue is an enhanced DeltaFIFO that provides reliable Deleted deltas even if no knownObjects store is given, and compresses multiple deltas to reduce duplicate events.

Without a store, DeltaFIFO will drop Deleted deltas when its queue is empty because the deleted object is not present in the queue and DeltaFIFO tries to protect against duplicate Deleted deltas resulting from Replace().

To get reliable deletion, a store must be provided, and EventQueue provides one if the caller does not.

func NewEventQueue

func NewEventQueue(keyFunc cache.KeyFunc) *EventQueue

func NewEventQueueForStore

func NewEventQueueForStore(keyFunc cache.KeyFunc, knownObjects cache.KeyListerGetter) *EventQueue

func (*EventQueue) Pop

func (queue *EventQueue) Pop(process ProcessEventFunc) (interface{}, error)

Process queued changes for an object. The 'process' function is called repeatedly with each available cache.Delta that describes state changes for that object. If the process function returns an error queued changes for that object are dropped but processing continues with the next available object's cache.Deltas. The error is logged with call stack information.

type FirewallRule

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

type NetworkInfo

type NetworkInfo struct {
	ClusterNetwork *net.IPNet
	ServiceNetwork *net.IPNet
}

type NodeIPTables

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

func (*NodeIPTables) Setup

func (n *NodeIPTables) Setup() error

type OsdnMaster

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

func (*OsdnMaster) SubnetStartMaster

func (master *OsdnMaster) SubnetStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint32) error

func (*OsdnMaster) VnidStartMaster

func (master *OsdnMaster) VnidStartMaster() error

type OsdnNode

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

func NewNodePlugin

func NewNodePlugin(pluginName string, osClient *osclient.Client, kClient *kclient.Client, hostname string, selfIP string, iptablesSyncPeriod time.Duration, mtu uint32) (*OsdnNode, error)

Called by higher layers to create the plugin SDN node instance

func (*OsdnNode) AddHostSubnetRules

func (plugin *OsdnNode) AddHostSubnetRules(subnet *osapi.HostSubnet) error

func (*OsdnNode) AddServiceRules

func (plugin *OsdnNode) AddServiceRules(service *kapi.Service, netID uint32) error

func (*OsdnNode) Capabilities

func (node *OsdnNode) Capabilities() utilsets.Int

func (*OsdnNode) DeleteHostSubnetRules

func (plugin *OsdnNode) DeleteHostSubnetRules(subnet *osapi.HostSubnet) error

func (*OsdnNode) DeleteServiceRules

func (plugin *OsdnNode) DeleteServiceRules(service *kapi.Service) error

func (*OsdnNode) Event

func (node *OsdnNode) Event(name string, details map[string]interface{})

func (*OsdnNode) GetLocalPods

func (node *OsdnNode) GetLocalPods(namespace string) ([]kapi.Pod, error)

func (*OsdnNode) GetPodNetworkStatus

func (node *OsdnNode) GetPodNetworkStatus(namespace string, name string, id kubeletTypes.ContainerID) (*knetwork.PodNetworkStatus, error)

func (*OsdnNode) Init

func (node *OsdnNode) Init(host knetwork.Host, hairpinMode componentconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) error

This kubelet network plugin shim only exists to grab the knetwork.Host Everything else is simply proxied directly to the kubenet CNI driver.

func (*OsdnNode) IsPodNetworkReady

func (node *OsdnNode) IsPodNetworkReady() error

func (*OsdnNode) Name

func (node *OsdnNode) Name() string

func (*OsdnNode) SetUpPod

func (node *OsdnNode) SetUpPod(namespace string, name string, id kubeletTypes.ContainerID) error

func (*OsdnNode) SetupEgressNetworkPolicy

func (plugin *OsdnNode) SetupEgressNetworkPolicy() error

func (*OsdnNode) SetupSDN

func (plugin *OsdnNode) SetupSDN() (bool, error)

func (*OsdnNode) Start

func (node *OsdnNode) Start() error

func (*OsdnNode) Status

func (node *OsdnNode) Status() error

func (*OsdnNode) SubnetStartNode

func (node *OsdnNode) SubnetStartNode() error

func (*OsdnNode) TearDownPod

func (node *OsdnNode) TearDownPod(namespace string, name string, id kubeletTypes.ContainerID) error

func (*OsdnNode) UpdateEgressNetworkPolicyVNID

func (plugin *OsdnNode) UpdateEgressNetworkPolicyVNID(namespace string, oldVnid, newVnid uint32) error

func (*OsdnNode) UpdatePod

func (node *OsdnNode) UpdatePod(pod kapi.Pod) error

FIXME: this should eventually go into kubelet via a CNI UPDATE/CHANGE action See https://github.com/containernetworking/cni/issues/89

func (*OsdnNode) VnidStartNode

func (node *OsdnNode) VnidStartNode() error

type OsdnProxy

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

func NewProxyPlugin

func NewProxyPlugin(pluginName string, osClient *osclient.Client, kClient *kclient.Client) (*OsdnProxy, error)

Called by higher layers to create the proxy plugin instance; only used by nodes

func (*OsdnProxy) OnEndpointsUpdate

func (proxy *OsdnProxy) OnEndpointsUpdate(allEndpoints []kapi.Endpoints)

func (*OsdnProxy) Start

func (proxy *OsdnProxy) Start(baseHandler pconfig.EndpointsConfigHandler) error

type PodConfig

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

type ProcessEventFunc

type ProcessEventFunc func(delta cache.Delta) error

type ResourceName

type ResourceName string
const (
	Nodes                 ResourceName = "Nodes"
	Namespaces            ResourceName = "Namespaces"
	NetNamespaces         ResourceName = "NetNamespaces"
	Services              ResourceName = "Services"
	HostSubnets           ResourceName = "HostSubnets"
	Pods                  ResourceName = "Pods"
	EgressNetworkPolicies ResourceName = "EgressNetworkPolicies"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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