controller

package
v0.0.0-...-75499ab Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HONodeController

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

HONodeController is the node hybrid overlay controller This controller will be running on hybrid overlay node. It is responsible for

  1. Add Hybrid Overlay DRMAC annotation to its own node object,
  2. Remove the ovnkube pod annotations from the pods running on this node.

func (*HONodeController) AddNode

func (n *HONodeController) AddNode(node *kapi.Node) error

AddNode set annotations about its VTEP and gateway MAC address to its own node object

func (*HONodeController) AddPod

func (n *HONodeController) AddPod(pod *kapi.Pod) error

AddPod remove the ovnkube annotation from the pods running on its own node

func (*HONodeController) DeleteNode

func (n *HONodeController) DeleteNode(node *kapi.Node) error

Delete handles node deletions

func (*HONodeController) DeletePod

func (n *HONodeController) DeletePod(pod *kapi.Pod) error

func (*HONodeController) EnsureHybridOverlayBridge

func (n *HONodeController) EnsureHybridOverlayBridge(node *kapi.Node) error

func (*HONodeController) RunFlowSync

func (n *HONodeController) RunFlowSync(stopCh <-chan struct{})

type Node

type Node struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Node is a node controller and it's informers

func NewNode

func NewNode(
	kube kube.Interface,
	nodeName string,
	nodeInformer cache.SharedIndexInformer,
	localPodInformer cache.SharedIndexInformer,
	eventHandlerCreateFunction informer.EventHandlerCreateFunction,
	isHONode bool,
) (*Node, error)

TODO(jtanenba) the localPodInformer no longer selects only local pods

func (*Node) IsReady

func (n *Node) IsReady() bool

func (*Node) Run

func (n *Node) Run(stopCh <-chan struct{})

Run starts the controller and does not return until all operations have terminated after the stop channel is closed

type NodeController

type NodeController struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NodeController is the node hybrid overlay controller. This controller is running in ovnkube-node binary. It's responsible for local node configuration and annotation.

func (*NodeController) AddNode

func (n *NodeController) AddNode(node *kapi.Node) error

AddNode handles node additions and updates

func (*NodeController) AddPod

func (n *NodeController) AddPod(pod *kapi.Pod) error

AddPod handles the pod add event

func (*NodeController) DeleteNode

func (n *NodeController) DeleteNode(node *kapi.Node) error

DeleteNode handles node deletions

func (*NodeController) DeletePod

func (n *NodeController) DeletePod(pod *kapi.Pod) error

DeletePod handles the pod delete event

func (*NodeController) EnsureHybridOverlayBridge

func (n *NodeController) EnsureHybridOverlayBridge(node *kapi.Node) error

EnsureHybridOverlayBridge sets up the hybrid overlay bridge

func (*NodeController) RunFlowSync

func (n *NodeController) RunFlowSync(stopCh <-chan struct{})

RunFlowSync runs flow synchronization It runs once when the controller is started. It will block until the stopCh is closed, running the sync periodically, or when signalled via the flowChan

func (*NodeController) Sync

func (n *NodeController) Sync(objs []*kapi.Node)

Sync is not needed but must be implemented to fulfill the interface

Jump to

Keyboard shortcuts

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