plugin

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2016 License: Apache-2.0 Imports: 41 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"
	LBR      = "lbr0"
	TUN      = "tun0"
	VLINUXBR = "vlinuxbr"
	VOVSBR   = "vovsbr"
	VXLAN    = "vxlan0"

	VXLAN_PORT = "4789"

	EgressNetworkPolicyFailureLabel = "network.openshift.io/not-enforcing-egress-network-policy"
)
View Source
const (
	SingleTenantPluginName string = "redhat/openshift-ovs-subnet"
	MultiTenantPluginName  string = "redhat/openshift-ovs-multitenant"

	IngressBandwidthAnnotation string = "kubernetes.io/ingress-bandwidth"
	EgressBandwidthAnnotation  string = "kubernetes.io/egress-bandwidth"
	AssignMacVlanAnnotation    string = "pod.network.openshift.io/assign-macvlan"
)

Variables

This section is empty.

Functions

func IsOpenShiftMultitenantNetworkPlugin

func IsOpenShiftMultitenantNetworkPlugin(pluginName string) bool

func IsOpenShiftNetworkPlugin

func IsOpenShiftNetworkPlugin(pluginName string) bool

func NewNodePlugin

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

Called by higher layers to create the plugin SDN node instance

func NewProxyPlugin

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

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

func StartMaster

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

Types

type FirewallRule

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

type NetworkInfo

type NetworkInfo struct {
	ClusterNetwork   *net.IPNet
	ServiceNetwork   *net.IPNet
	HostSubnetLength uint32
	PluginName       string
}

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 (*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 (plugin *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 (plugin *OsdnNode) Event(name string, details map[string]interface{})

func (*OsdnNode) GetLocalPods

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

func (*OsdnNode) GetPodNetworkStatus

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

func (*OsdnNode) Init

func (plugin *OsdnNode) Init(host knetwork.Host, _ componentconfig.HairpinMode, _ string) error

func (*OsdnNode) Name

func (plugin *OsdnNode) Name() string

func (*OsdnNode) SetUpPod

func (plugin *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(localSubnetCIDR, clusterNetworkCIDR, servicesNetworkCIDR string, mtu uint32) (bool, error)

func (*OsdnNode) Start

func (node *OsdnNode) Start() error

func (*OsdnNode) Status

func (plugin *OsdnNode) Status() error

func (*OsdnNode) SubnetStartNode

func (node *OsdnNode) SubnetStartNode(mtu uint32) (bool, error)

func (*OsdnNode) TearDownPod

func (plugin *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 (plugin *OsdnNode) UpdatePod(namespace string, name string, id kubeletTypes.DockerID) error

func (*OsdnNode) VnidStartNode

func (node *OsdnNode) VnidStartNode() error

func (*OsdnNode) WaitForPodNetworkReady

func (node *OsdnNode) WaitForPodNetworkReady() error

type Registry

type Registry struct {

	// Cache cluster network information
	NetworkInfo *NetworkInfo
	// contains filtered or unexported fields
}

func (*Registry) CreateClusterNetwork

func (registry *Registry) CreateClusterNetwork(ni *NetworkInfo) error

func (*Registry) CreateNetNamespace

func (registry *Registry) CreateNetNamespace(name string, id uint32) error

func (*Registry) CreateSubnet

func (registry *Registry) CreateSubnet(nodeName, nodeIP, subnetCIDR string) (*osapi.HostSubnet, error)

func (*Registry) DeleteNetNamespace

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

func (*Registry) DeleteSubnet

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

func (*Registry) GetEgressNetworkPolicies

func (registry *Registry) GetEgressNetworkPolicies() ([]osapi.EgressNetworkPolicy, error)

func (*Registry) GetNetNamespace

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

func (*Registry) GetNetNamespaces

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

func (*Registry) GetNetworkInfo

func (registry *Registry) GetNetworkInfo() (*NetworkInfo, error)

func (*Registry) GetPod

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

func (*Registry) GetRunningPods

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

func (*Registry) GetServices

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

func (*Registry) GetServicesForNamespace

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

func (*Registry) GetSubnet

func (registry *Registry) GetSubnet(nodeName string) (*osapi.HostSubnet, error)

func (*Registry) GetSubnets

func (registry *Registry) GetSubnets() ([]osapi.HostSubnet, error)

func (*Registry) RunEventQueue

func (registry *Registry) RunEventQueue(resourceName ResourceName) *oscache.EventQueue

Run event queue for the given resource

func (*Registry) UpdateClusterNetwork

func (registry *Registry) UpdateClusterNetwork(ni *NetworkInfo) error

func (*Registry) UpdateNetNamespace

func (registry *Registry) UpdateNetNamespace(netns *osapi.NetNamespace) (*osapi.NetNamespace, error)

func (*Registry) UpdateSubnet

func (registry *Registry) UpdateSubnet(hs *osapi.HostSubnet) (*osapi.HostSubnet, error)

func (*Registry) ValidateNodeIP

func (registry *Registry) ValidateNodeIP(nodeIP string) 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