node

package
v0.0.0-alpha.0....-f4cdaa2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Overview

Package node contains the OpenShift SDN networking code that runs on the nodes

Index

Constants

View Source
const (
	Br0    = "br0"
	Tun0   = "tun0"
	Vxlan0 = "vxlan0"
)
View Source
const HostNetworkNamespace = "openshift-host-network"
View Source
const NetPolIsolationCookie = 1147582955

NetPolIsolationCookie is a random number to distinguish network policy isolation flows, only used by network policy functions

Variables

View Source
var (
	ErrorNetworkInterfaceNotFound = fmt.Errorf("could not find network interface")
)

Functions

func GetLinkDetails

func GetLinkDetails(ip string) (netlink.Link, *net.IPNet, error)

func NewMultiTenantPlugin

func NewMultiTenantPlugin() osdnPolicy

func NewNetworkPolicyPlugin

func NewNetworkPolicyPlugin() osdnPolicy

func NewOVSController

func NewOVSController(ovsif ovs.Interface, pluginId int, localIP string, localMAC string) *ovsController

func NewSingleTenantPlugin

func NewSingleTenantPlugin() osdnPolicy

Types

type Chain

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

type NodeIPTables

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

func (*NodeIPTables) AddEgressIPRules

func (n *NodeIPTables) AddEgressIPRules(egressIP, mark string) error

func (*NodeIPTables) DeleteEgressIPRules

func (n *NodeIPTables) DeleteEgressIPRules(egressIP, mark string) error

func (*NodeIPTables) Setup

func (n *NodeIPTables) Setup() error

func (*NodeIPTables) SyncEgressIPRules

func (n *NodeIPTables) SyncEgressIPRules()

type OsdnNode

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

func New

func New(c *OsdnNodeConfig) (*OsdnNode, error)

Called by higher layers to create the plugin SDN node instance

func (*OsdnNode) FinishSetupSDN

func (plugin *OsdnNode) FinishSetupSDN() error

func (*OsdnNode) GetRunningPods

func (node *OsdnNode) GetRunningPods(namespace string) ([]corev1.Pod, error)

func (*OsdnNode) ReloadIPTables

func (node *OsdnNode) ReloadIPTables() error

func (*OsdnNode) SetupEgressNetworkPolicy

func (plugin *OsdnNode) SetupEgressNetworkPolicy() error

func (*OsdnNode) SetupSDN

func (plugin *OsdnNode) SetupSDN() (bool, map[string]podNetworkInfo, error)

func (*OsdnNode) Start

func (node *OsdnNode) Start() error

func (*OsdnNode) UpdateEgressNetworkPolicyVNID

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

func (*OsdnNode) UpdatePod

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

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

type OsdnNodeConfig

type OsdnNodeConfig struct {
	NodeName     string
	NodeIP       string
	PlatformType string

	OSDNClient osdnclient.Interface
	KClient    kubernetes.Interface
	Recorder   record.EventRecorder

	KubeInformers informers.SharedInformerFactory
	OSDNInformers osdninformers.SharedInformerFactory

	IPTables      iptables.Interface
	MasqueradeBit *int32

	OverrideMTU uint32
	RoutableMTU uint32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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