nodediscovery

package
v0.0.0-...-686bfca Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// AutoCIDR indicates that a CIDR should be allocated
	AutoCIDR = "auto"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeDiscovery

type NodeDiscovery struct {
	Manager     *nodemanager.Manager
	LocalConfig datapath.LocalNodeConfiguration
	Registered  chan struct{}

	NetConf *cnitypes.NetConf
	// contains filtered or unexported fields
}

NodeDiscovery represents a node discovery action

func NewNodeDiscovery

func NewNodeDiscovery(manager *nodemanager.Manager, mtuConfig mtu.Configuration, netConf *cnitypes.NetConf) *NodeDiscovery

NewNodeDiscovery returns a pointer to new node discovery object

func (*NodeDiscovery) Close

func (n *NodeDiscovery) Close()

Close shuts down the node discovery engine

func (*NodeDiscovery) ClusterSizeDependantInterval

func (n *NodeDiscovery) ClusterSizeDependantInterval(baseInterval time.Duration) time.Duration

func (*NodeDiscovery) LocalAllocCIDRsUpdated

func (n *NodeDiscovery) LocalAllocCIDRsUpdated(ipv4AllocCIDRs, ipv6AllocCIDRs []*cidr.CIDR)

LocalAllocCIDRsUpdated informs the agent that the local allocation CIDRs have changed. This will inform the datapath node manager to update the local node routes accordingly. The first CIDR in ipv[46]AllocCIDRs is presumed to be the primary CIDR: This CIDR remains assigned to the local node and may not be switched out or be removed.

func (*NodeDiscovery) NodeDeleted

func (n *NodeDiscovery) NodeDeleted(node nodeTypes.Node)

func (*NodeDiscovery) NodeUpdated

func (n *NodeDiscovery) NodeUpdated(node nodeTypes.Node)

func (*NodeDiscovery) RegisterK8sNodeGetter

func (n *NodeDiscovery) RegisterK8sNodeGetter(k8sNodeGetter k8sNodeGetter)

func (*NodeDiscovery) StartDiscovery

func (n *NodeDiscovery) StartDiscovery()

StartDiscovery start configures the local node and starts node discovery. This is called on agent startup to configure the local node based on the configuration options passed to the agent. nodeName is the name to be used in the local agent.

func (*NodeDiscovery) UpdateLocalNode

func (n *NodeDiscovery) UpdateLocalNode()

UpdateLocalNode syncs the internal localNode object with the actual state of the local node and publishes the corresponding updated KV store entry and/or NetResourceSet object

func (*NodeDiscovery) UpdateNetResourceSetResource

func (n *NodeDiscovery) UpdateNetResourceSetResource()

UpdateNetResourceSetResource updates the NetResourceSet resource representing the local node

func (*NodeDiscovery) WaitForLocalNodeInit

func (n *NodeDiscovery) WaitForLocalNodeInit()

WaitForLocalNodeInit blocks until StartDiscovery() has been called. This is used to block until Node's local IP addresses have been allocated, see https://github.com/baidubce/baiducloud-cce-cni-driver/cce-network-v2/pull/14299 and https://github.com/baidubce/baiducloud-cce-cni-driver/cce-network-v2/pull/14670.

Jump to

Keyboard shortcuts

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