{"modulePath":"github.com/wainersm/openshift_origin","version":"v4.1.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package node\n\nPackage node contains the OpenShift SDN networking code that runs on the nodes\n\n## Constants\n\n```go\nconst (\n\tSDNNamespace = \"openshift\"\n\tSDNSubsystem = \"sdn\"\n\n\tOVSFlowsKey                 = \"ovs_flows\"\n\tARPCacheAvailableEntriesKey = \"arp_cache_entries\"\n\tPodIPsKey                   = \"pod_ips\"\n\tPodOperationsErrorsKey      = \"pod_operations_errors\"\n\tPodOperationsLatencyKey     = \"pod_operations_latency\"\n\tVnidNotFoundErrorsKey       = \"vnid_not_found_errors\"\n\n\t// Pod Operation types\n\tPodOperationSetup    = \"setup\"\n\tPodOperationTeardown = \"teardown\"\n)\n```\n\n```go\nconst (\n\tBr0    = \"br0\"\n\tTun0   = \"tun0\"\n\tVxlan0 = \"vxlan0\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tOVSFlows = prometheus.NewGauge(\n\t\tprometheus.GaugeOpts{\n\t\t\tNamespace: SDNNamespace,\n\t\t\tSubsystem: SDNSubsystem,\n\t\t\tName:      OVSFlowsKey,\n\t\t\tHelp:      \"Number of Open vSwitch flows\",\n\t\t},\n\t)\n\n\tARPCacheAvailableEntries = prometheus.NewGauge(\n\t\tprometheus.GaugeOpts{\n\t\t\tNamespace: SDNNamespace,\n\t\t\tSubsystem: SDNSubsystem,\n\t\t\tName:      ARPCacheAvailableEntriesKey,\n\t\t\tHelp:      \"Number of available entries in the ARP cache\",\n\t\t},\n\t)\n\n\tPodIPs = prometheus.NewGauge(\n\t\tprometheus.GaugeOpts{\n\t\t\tNamespace: SDNNamespace,\n\t\t\tSubsystem: SDNSubsystem,\n\t\t\tName:      PodIPsKey,\n\t\t\tHelp:      \"Number of allocated pod IPs\",\n\t\t},\n\t)\n\n\tPodOperationsErrors = prometheus.NewCounterVec(\n\t\tprometheus.CounterOpts{\n\t\t\tNamespace: SDNNamespace,\n\t\t\tSubsystem: SDNSubsystem,\n\t\t\tName:      PodOperationsErrorsKey,\n\t\t\tHelp:      \"Cumulative number of SDN operation errors by operation type\",\n\t\t},\n\t\t[]string{\"operation_type\"},\n\t)\n\n\tPodOperationsLatency = prometheus.NewSummaryVec(\n\t\tprometheus.SummaryOpts{\n\t\t\tNamespace: SDNNamespace,\n\t\t\tSubsystem: SDNSubsystem,\n\t\t\tName:      PodOperationsLatencyKey,\n\t\t\tHelp:      \"Latency in microseconds of SDN operations by operation type\",\n\t\t},\n\t\t[]string{\"operation_type\"},\n\t)\n\n\tVnidNotFoundErrors = prometheus.NewCounter(\n\t\tprometheus.CounterOpts{\n\t\t\tNamespace: SDNNamespace,\n\t\t\tSubsystem: SDNSubsystem,\n\t\t\tName:      VnidNotFoundErrorsKey,\n\t\t\tHelp:      \"Number of VNID-not-found errors\",\n\t\t},\n\t)\n)\n```\n\n```go\nvar (\n\tErrorNetworkInterfaceNotFound = fmt.Errorf(\"could not find network interface\")\n)\n```\n\n## Functions\n\n```go\nfunc GetLinkDetails(ip string) (netlink.Link, *net.IPNet, error)\n```\n\n```go\nfunc NewMultiTenantPlugin() osdnPolicy\n```\n\n```go\nfunc NewNetworkPolicyPlugin() osdnPolicy\n```\n\n```go\nfunc NewOVSController(ovsif ovs.Interface, pluginId int, useConnTrack bool, localIP string) *ovsController\n```\n\n```go\nfunc NewSingleTenantPlugin() osdnPolicy\n```\n\n```go\nfunc RegisterMetrics()\n```\nRegister all node metrics.\n\n## Types\n\n```go\ntype Chain struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype NodeIPTables struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (n *NodeIPTables) AddEgressIPRules(egressIP, mark string) error\n```\n\n```go\nfunc (n *NodeIPTables) DeleteEgressIPRules(egressIP, mark string) error\n```\n\n```go\nfunc (n *NodeIPTables) Setup() error\n```\n\n```go\ntype OsdnNode struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(c *OsdnNodeConfig) (*OsdnNode, error)\n```\nCalled by higher layers to create the plugin SDN node instance\n\n```go\nfunc (plugin *OsdnNode) AddServiceRules(service *corev1.Service, netID uint32)\n```\n\n```go\nfunc (plugin *OsdnNode) DeleteServiceRules(service *corev1.Service)\n```\n\n```go\nfunc (node *OsdnNode) GetLocalPods(namespace string) ([]corev1.Pod, error)\n```\n\n```go\nfunc (plugin *OsdnNode) SetupEgressNetworkPolicy() error\n```\n\n```go\nfunc (plugin *OsdnNode) SetupSDN() (bool, map[string]podNetworkInfo, error)\n```\n\n```go\nfunc (node *OsdnNode) Start() error\n```\n\n```go\nfunc (plugin *OsdnNode) UpdateEgressNetworkPolicyVNID(namespace string, oldVnid, newVnid uint32)\n```\n\n```go\nfunc (node *OsdnNode) UpdatePod(pod corev1.Pod) error\n```\nFIXME: this should eventually go into kubelet via a CNI UPDATE/CHANGE action See [https://github.com/containernetworking/cni/issues/89](https://github.com/containernetworking/cni/issues/89)\n\n```go\ntype OsdnNodeConfig struct {\n\tPluginName      string\n\tHostname        string\n\tSelfIP          string\n\tRuntimeEndpoint string\n\tMTU             uint32\n\tEnableHostports bool\n\tCNIBinDir       string\n\tCNIConfDir      string\n\n\tNetworkClient networkclient.Interface\n\tKClient       kubernetes.Interface\n\tRecorder      record.EventRecorder\n\n\tKubeInformers    informers.SharedInformerFactory\n\tNetworkInformers networkinformers.SharedInformerFactory\n\n\tIPTablesSyncPeriod time.Duration\n\tProxyMode          kubeproxyconfig.ProxyMode\n\tMasqueradeBit      *int32\n}\n```\n\n","path":"github.com/wainersm/openshift_origin/pkg/network/node","name":"node","synopsis":"Package node contains the OpenShift SDN networking code that runs on the nodes","isRedistributable":true}
