nodediscovery

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 35 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 GetNodeAddresses

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

type NodeDiscovery

type NodeDiscovery struct {
	Manager     nodemanager.NodeManager
	LocalConfig datapath.LocalNodeConfiguration
	Registrar   nodestore.NodeRegistrar
	Registered  chan struct{}

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

NodeDiscovery represents a node discovery action

func NewNodeDiscovery

func NewNodeDiscovery(manager nodemanager.NodeManager, clientset client.Clientset, lns *node.LocalNodeStore, mtu mtu.MTU, netConf *cnitypes.NetConf) *NodeDiscovery

NewNodeDiscovery returns a pointer to new node discovery object

func (*NodeDiscovery) ClusterSizeDependantInterval

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

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

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

func (*NodeDiscovery) NodeUpdated

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

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