Documentation
¶
Overview ¶
Package node contains the OpenShift SDN networking code that runs on the nodes
Index ¶
- Constants
- Variables
- func GetLinkDetails(ip string) (netlink.Link, *net.IPNet, error)
- func NewMultiTenantPlugin() osdnPolicy
- func NewNetworkPolicyPlugin() osdnPolicy
- func NewOVSController(ovsif ovs.Interface, pluginId int, useConnTrack bool, localIP string) *ovsController
- func NewSingleTenantPlugin() osdnPolicy
- func RegisterMetrics()
- type Chain
- type NodeIPTables
- type OsdnNode
- func (plugin *OsdnNode) AddServiceRules(service *corev1.Service, netID uint32)
- func (plugin *OsdnNode) DeleteServiceRules(service *corev1.Service)
- func (node *OsdnNode) GetLocalPods(namespace string) ([]corev1.Pod, error)
- func (plugin *OsdnNode) SetupEgressNetworkPolicy() error
- func (plugin *OsdnNode) SetupSDN() (bool, map[string]podNetworkInfo, error)
- func (node *OsdnNode) Start() error
- func (plugin *OsdnNode) UpdateEgressNetworkPolicyVNID(namespace string, oldVnid, newVnid uint32)
- func (node *OsdnNode) UpdatePod(pod corev1.Pod) error
- type OsdnNodeConfig
Constants ¶
View Source
const ( SDNNamespace = "openshift" SDNSubsystem = "sdn" OVSFlowsKey = "ovs_flows" ARPCacheAvailableEntriesKey = "arp_cache_entries" PodIPsKey = "pod_ips" PodOperationsErrorsKey = "pod_operations_errors" PodOperationsLatencyKey = "pod_operations_latency" VnidNotFoundErrorsKey = "vnid_not_found_errors" // Pod Operation types PodOperationSetup = "setup" PodOperationTeardown = "teardown" )
View Source
const ( Br0 = "br0" Tun0 = "tun0" Vxlan0 = "vxlan0" )
Variables ¶
View Source
var ( OVSFlows = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: SDNNamespace, Subsystem: SDNSubsystem, Name: OVSFlowsKey, Help: "Number of Open vSwitch flows", }, ) ARPCacheAvailableEntries = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: SDNNamespace, Subsystem: SDNSubsystem, Name: ARPCacheAvailableEntriesKey, Help: "Number of available entries in the ARP cache", }, ) PodIPs = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: SDNNamespace, Subsystem: SDNSubsystem, Name: PodIPsKey, Help: "Number of allocated pod IPs", }, ) PodOperationsErrors = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: SDNNamespace, Subsystem: SDNSubsystem, Name: PodOperationsErrorsKey, Help: "Cumulative number of SDN operation errors by operation type", }, []string{"operation_type"}, ) PodOperationsLatency = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Namespace: SDNNamespace, Subsystem: SDNSubsystem, Name: PodOperationsLatencyKey, Help: "Latency in microseconds of SDN operations by operation type", }, []string{"operation_type"}, ) VnidNotFoundErrors = prometheus.NewCounter( prometheus.CounterOpts{ Namespace: SDNNamespace, Subsystem: SDNSubsystem, Name: VnidNotFoundErrorsKey, Help: "Number of VNID-not-found errors", }, ) )
Functions ¶
func NewMultiTenantPlugin ¶
func NewMultiTenantPlugin() osdnPolicy
func NewNetworkPolicyPlugin ¶
func NewNetworkPolicyPlugin() osdnPolicy
func NewOVSController ¶
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
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) AddServiceRules ¶
func (*OsdnNode) DeleteServiceRules ¶
func (*OsdnNode) GetLocalPods ¶
func (*OsdnNode) SetupEgressNetworkPolicy ¶
func (*OsdnNode) SetupSDN ¶
func (*OsdnNode) UpdateEgressNetworkPolicyVNID ¶
type OsdnNodeConfig ¶
type OsdnNodeConfig struct {
PluginName string
Hostname string
SelfIP string
RuntimeEndpoint string
MTU uint32
EnableHostports bool
CNIBinDir string
CNIConfDir string
NetworkClient networkclient.Interface
KClient kubernetes.Interface
Recorder record.EventRecorder
KubeInformers informers.SharedInformerFactory
NetworkInformers networkinformers.SharedInformerFactory
IPTablesSyncPeriod time.Duration
ProxyMode kubeproxyconfig.ProxyMode
MasqueradeBit *int32
}
Source Files
¶
- doc.go
- egress_network_policy.go
- egressip.go
- healthcheck.go
- iptables.go
- metrics.go
- multitenant.go
- networkpolicy.go
- node.go
- ovscontroller.go
- pod.go
- runtime.go
- sdn_controller.go
- singletenant.go
- subnets.go
- vnids.go
- vxlan_monitor.go
Click to show internal directories.
Click to hide internal directories.