Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Cell = cell.Module( "nodediscovery", "Communicate changes in local node information to the API server or KVStore", cell.Provide(NewNodeDiscovery), cell.Provide(func(nd *NodeDiscovery) endpoint.KVStoreNodesWaitFn { return nd.WaitForKVStoreSync }), )
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 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, k8sNodeWatcher *watchers.K8sCiliumNodeWatcher, ) *NodeDiscovery
NewNodeDiscovery returns a pointer to new node discovery object
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) WaitForKVStoreSync ¶ added in v1.16.4
func (n *NodeDiscovery) WaitForKVStoreSync(ctx context.Context) error
WaitForKVStoreSync blocks until kvstore synchronization of node information completed. It returns immediately in CRD mode.
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.