nodediscovery

package
v1.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 37 Imported by: 5

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 KVStoreNodeUpdater added in v1.11.5

type KVStoreNodeUpdater interface {
	UpdateKVNodeEntry(node *nodeTypes.Node) error
}

The KVStoreNodeUpdater interface is used to provide an abstraction for the NodeStore object logic used to update a node entry in the KV store.

type NodeDiscovery

type NodeDiscovery struct {
	Manager               *nodemanager.Manager
	LocalConfig           datapath.LocalNodeConfiguration
	Registrar             nodestore.NodeRegistrar
	Registered            chan struct{}
	LocalStateInitialized 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 added in v1.5.0

func (n *NodeDiscovery) Close()

Close shuts down the node discovery engine

func (*NodeDiscovery) JoinCluster

func (n *NodeDiscovery) JoinCluster(nodeName string)

JoinCluster passes the node name to the kvstore and updates the local configuration on response. This allows cluster configuration to override local configuration. Must be called on agent startup after IPAM is configured, but before the configuration is used. nodeName is the name to be used in the local agent.

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) RegisterK8sNodeGetter added in v1.10.3

func (n *NodeDiscovery) RegisterK8sNodeGetter(k8sNodeGetter k8sNodeGetter)

func (*NodeDiscovery) StartDiscovery

func (n *NodeDiscovery) 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) UpdateCiliumNodeResource

func (n *NodeDiscovery) UpdateCiliumNodeResource()

UpdateCiliumNodeResource updates the CiliumNode resource representing the local node

func (*NodeDiscovery) UpdateKVNodeEntry added in v1.11.5

func (nodeDiscovery *NodeDiscovery) UpdateKVNodeEntry(node *nodeTypes.Node) error

Jump to

Keyboard shortcuts

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