Documentation ¶
Index ¶
- Constants
- type NodeDiscovery
- func (n *NodeDiscovery) Close()
- func (n *NodeDiscovery) ClusterSizeDependantInterval(baseInterval time.Duration) time.Duration
- func (n *NodeDiscovery) LocalAllocCIDRsUpdated(ipv4AllocCIDRs, ipv6AllocCIDRs []*cidr.CIDR)
- func (n *NodeDiscovery) NodeDeleted(node nodeTypes.Node)
- func (n *NodeDiscovery) NodeUpdated(node nodeTypes.Node)
- func (u *NodeDiscovery) OnAddNode(node *corev1.Node, wg *lock.StoppableWaitGroup) error
- func (*NodeDiscovery) OnDeleteNode(*corev1.Node, *lock.StoppableWaitGroup) error
- func (u *NodeDiscovery) OnUpdateNode(oldObj *corev1.Node, newObj *corev1.Node, swg *lock.StoppableWaitGroup) error
- func (n *NodeDiscovery) RegisterK8sNodeGetter(k8sNodeGetter k8sNodeGetter)
- func (n *NodeDiscovery) RegisterNrcsNodeGetter(nrcsNodeGetter nrcsNodeGetter)
- func (n *NodeDiscovery) ResourceType() string
- func (n *NodeDiscovery) StartDiscovery()
- func (n *NodeDiscovery) UpdateLocalNode()
- func (n *NodeDiscovery) UpdateNetResourceSetResource()
- func (n *NodeDiscovery) WaitForLocalNodeInit()
- type RdmaDiscovery
- func (rd *RdmaDiscovery) Close()
- func (rd *RdmaDiscovery) LocalAllocCIDRsUpdated(ipv4AllocCIDRs, ipv6AllocCIDRs []*cidr.CIDR)
- func (rd *RdmaDiscovery) RegisterK8sNodeGetter(k8sNodeGetter k8sNodeGetter)
- func (rd *RdmaDiscovery) ResourceType() string
- func (rd *RdmaDiscovery) StartDiscovery()
- func (rd *RdmaDiscovery) UpdateLocalNode()
- func (rd *RdmaDiscovery) UpdateNetResourceSetResource()
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 Registered 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 ¶
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) 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) NodeDeleted ¶
func (n *NodeDiscovery) NodeDeleted(node nodeTypes.Node)
func (*NodeDiscovery) NodeUpdated ¶
func (n *NodeDiscovery) NodeUpdated(node nodeTypes.Node)
func (*NodeDiscovery) OnAddNode ¶
func (u *NodeDiscovery) OnAddNode(node *corev1.Node, wg *lock.StoppableWaitGroup) error
OnAddNode implements subscriber.Node.
func (*NodeDiscovery) OnDeleteNode ¶
func (*NodeDiscovery) OnDeleteNode(*corev1.Node, *lock.StoppableWaitGroup) error
OnDeleteNode implements subscriber.Node.
func (*NodeDiscovery) OnUpdateNode ¶
func (u *NodeDiscovery) OnUpdateNode(oldObj *corev1.Node, newObj *corev1.Node, swg *lock.StoppableWaitGroup) error
OnUpdateNode implements subscriber.Node.
func (*NodeDiscovery) RegisterK8sNodeGetter ¶
func (n *NodeDiscovery) RegisterK8sNodeGetter(k8sNodeGetter k8sNodeGetter)
func (*NodeDiscovery) RegisterNrcsNodeGetter ¶
func (n *NodeDiscovery) RegisterNrcsNodeGetter(nrcsNodeGetter nrcsNodeGetter)
func (*NodeDiscovery) ResourceType ¶
func (n *NodeDiscovery) ResourceType() string
func (*NodeDiscovery) StartDiscovery ¶
func (n *NodeDiscovery) StartDiscovery()
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) 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 NetResourceSet object
func (*NodeDiscovery) UpdateNetResourceSetResource ¶
func (n *NodeDiscovery) UpdateNetResourceSetResource()
UpdateNetResourceSetResource updates the NetResourceSet resource representing the local node
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/baidubce/baiducloud-cce-cni-driver/cce-network-v2/pull/14299 and https://github.com/baidubce/baiducloud-cce-cni-driver/cce-network-v2/pull/14670.
type RdmaDiscovery ¶
type RdmaDiscovery struct {
*NodeDiscovery
}
RdmaDiscovery represents a node discovery action
func NewRdmaDiscovery ¶
func NewRdmaDiscovery(manager *nodemanager.Manager, mtuConfig mtu.Configuration, netConf *cnitypes.NetConf) *RdmaDiscovery
NewNodeDiscovery returns a pointer to new node discovery object
func (*RdmaDiscovery) Close ¶
func (rd *RdmaDiscovery) Close()
Close shuts down the node discovery engine
func (*RdmaDiscovery) LocalAllocCIDRsUpdated ¶
func (rd *RdmaDiscovery) 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 (*RdmaDiscovery) RegisterK8sNodeGetter ¶
func (rd *RdmaDiscovery) RegisterK8sNodeGetter(k8sNodeGetter k8sNodeGetter)
func (*RdmaDiscovery) ResourceType ¶
func (rd *RdmaDiscovery) ResourceType() string
func (*RdmaDiscovery) StartDiscovery ¶
func (rd *RdmaDiscovery) 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 (*RdmaDiscovery) UpdateLocalNode ¶
func (rd *RdmaDiscovery) 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 NetResourceSet object
func (*RdmaDiscovery) UpdateNetResourceSetResource ¶
func (rd *RdmaDiscovery) UpdateNetResourceSetResource()
UpdateNetResourceSetResource updates the NetResourceSet resource representing the local node