nodediscovery

package
v1.16.0-pre.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 33 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"nodediscovery",
	"Communicate changes in local node information to the API server or KVStore",

	cell.Provide(NewNodeDiscovery),
)

The node discovery cell provides the local node configuration and node discovery which communicate changes in local node information to the API server or KVStore.

Functions

This section is empty.

Types

type GetNodeAddresses

type GetNodeAddresses interface {
	GetNodeAddresses() []nodeTypes.Address
}

type NodeDiscovery

type NodeDiscovery struct {
	Manager    nodemanager.NodeManager
	Registrar  nodestore.NodeRegistrar
	Registered chan struct{}
	// contains filtered or unexported fields
}

NodeDiscovery represents a node discovery action

func NewNodeDiscovery

func NewNodeDiscovery(
	manager nodemanager.NodeManager,
	clientset client.Clientset,
	lns *node.LocalNodeStore,
	cniConfigManager cni.CNIConfigManager,
) *NodeDiscovery

NewNodeDiscovery returns a pointer to new node discovery object

func (*NodeDiscovery) JoinCluster

func (n *NodeDiscovery) JoinCluster(nodeName string) error

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) RegisterK8sGetters

func (n *NodeDiscovery) RegisterK8sGetters(k8sGetters k8sGetters)

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. This function can be safely executed only before starting the discovery logic through StartDiscovery(), as otherwise possibly racing against concurrent updates triggered by the LocalNodeStore observer.

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/cilium/cilium/pull/14299 and https://github.com/cilium/cilium/pull/14670.

Jump to

Keyboard shortcuts

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