Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CIDRAllocator ¶ added in v1.8.0
type ErrAllocatorFull ¶
type ErrAllocatorFull struct { }
ErrAllocatorFull ...
func (*ErrAllocatorFull) Error ¶
func (e *ErrAllocatorFull) Error() string
Error returns the human-readable error for the ErrAllocatorFull
type ErrAllocatorNotFound ¶
type ErrAllocatorNotFound struct {
// contains filtered or unexported fields
}
ErrAllocatorNotFound is an error that should be used in case the node tries to allocate a CIDR for an allocator that does not exist.
func (*ErrAllocatorNotFound) Error ¶
func (e *ErrAllocatorNotFound) Error() string
Error returns the human-readable error for the ErrAllocatorNotFound
type ErrCIDRAllocated ¶
type ErrCIDRAllocated struct {
// contains filtered or unexported fields
}
ErrCIDRAllocated is an error that should be used when the requested CIDR is already allocated.
func (*ErrCIDRAllocated) Error ¶
func (e *ErrCIDRAllocated) Error() string
Error returns the human-readable error for the ErrAllocatorNotFound
type NodesPodCIDRManager ¶
type NodesPodCIDRManager struct { // Lock protects all fields below lock.Mutex // contains filtered or unexported fields }
NodesPodCIDRManager will be used to manage podCIDRs for the nodes in the cluster.
func NewNodesPodCIDRManager ¶
func NewNodesPodCIDRManager( v4Allocators, v6Allocators []CIDRAllocator, nodeGetter ipam.CiliumNodeGetterUpdater, triggerMetrics trigger.MetricsObserver) *NodesPodCIDRManager
NewNodesPodCIDRManager will create a node podCIDR manager. Both v4Allocators and v6Allocators can be nil, but not at the same time. nodeGetter will be used to populate synced node status / spec with kubernetes.
func (*NodesPodCIDRManager) Create ¶ added in v1.8.0
func (n *NodesPodCIDRManager) Create(node *v2.CiliumNode) bool
Create will re-allocate the node podCIDRs. In case the node already has podCIDRs allocated, the podCIDR allocator will try to allocate those CIDRs internally. In case the node does not have any podCIDR set, its allocation will only happen once n.Resync has been called at least one time. In case the CIDRs were able to be allocated, the CiliumNode will have its podCIDRs fields set with the allocated CIDRs. In case the CIDRs were unable to be allocated, this function will return true and the node will have its status updated into kubernetes with the error message by the NodesPodCIDRManager.
func (*NodesPodCIDRManager) Delete ¶
func (n *NodesPodCIDRManager) Delete(nodeName string)
Delete deletes the node from the allocator and releases the associated CIDRs of that node.
func (*NodesPodCIDRManager) Resync ¶
func (n *NodesPodCIDRManager) Resync(context.Context, time.Time)
Resync resyncs the nodes with k8s.
func (*NodesPodCIDRManager) Update ¶ added in v1.8.0
func (n *NodesPodCIDRManager) Update(node *v2.CiliumNode) bool
Update will re-allocate the node podCIDRs. In case the node already has podCIDRs allocated, the podCIDR allocator will try to allocate those CIDRs. In case the CIDRs were able to be allocated, the CiliumNode will have its podCIDRs fields set with the allocated CIDRs. In case the CIDRs were unable to be allocated, this function will return true and the node will have its status updated into kubernetes with the error message by the NodesPodCIDRManager.