Documentation ¶
Index ¶
- Constants
- type NodeDiscovery
- func (n *NodeDiscovery) Close()
- func (n *NodeDiscovery) ClusterSizeDependantInterval(baseInterval time.Duration) time.Duration
- func (n *NodeDiscovery) JoinCluster(nodeName string)
- func (n *NodeDiscovery) LocalAllocCIDRsUpdated(ipv4AllocCIDRs, ipv6AllocCIDRs []*cidr.CIDR)
- func (n *NodeDiscovery) LocalNode() *nodeTypes.Node
- func (n *NodeDiscovery) NodeDeleted(node nodeTypes.Node)
- func (n *NodeDiscovery) NodeUpdated(node nodeTypes.Node)
- func (n *NodeDiscovery) RegisterK8sGetters(k8sGetters k8sGetters)
- func (n *NodeDiscovery) StartDiscovery()
- func (n *NodeDiscovery) UpdateCiliumNodeResource()
- func (n *NodeDiscovery) UpdateLocalNode()
- func (n *NodeDiscovery) WaitForLocalNodeInit()
Constants ¶
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 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.Manager, clientset client.Clientset, 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) ClusterSizeDependantInterval ¶
func (n *NodeDiscovery) ClusterSizeDependantInterval(baseInterval time.Duration) time.Duration
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) LocalNode ¶
func (n *NodeDiscovery) LocalNode() *nodeTypes.Node
LocalNode syncs the localNode object with the information stored in the node package and then returns a copy of the localNode object
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
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 CiliumNode object
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.