Documentation
¶
Index ¶
- Variables
- func DeletePool(allocator *PoolAllocator, name string) error
- func ParsePoolSpec(poolString string) (*cilium_v2alpha1.IPv4PoolSpec, *cilium_v2alpha1.IPv6PoolSpec, error)
- func UpsertPool(allocator *PoolAllocator, name string, v4Spec *cilium_v2alpha1.IPv4PoolSpec, ...) error
- type Allocator
- type NodeHandler
- type PoolAllocator
- func (p *PoolAllocator) AllocateToNode(nodeName string, pools *types.IPAMPoolSpec) error
- func (p *PoolAllocator) AllocatedPools(targetNode string) (pools []types.IPAMPoolAllocation)
- func (p *PoolAllocator) DeletePool(poolName string) error
- func (p *PoolAllocator) ReleaseNode(nodeName string) error
- func (p *PoolAllocator) RestoreFinished()
- func (p *PoolAllocator) UpsertPool(poolName string, ipv4CIDRs []string, ipv4MaskSize int, ipv6CIDRs []string, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAllocatorNotReady = errAllocatorNotReady{}
Functions ¶
func DeletePool ¶
func DeletePool(allocator *PoolAllocator, name string) error
func ParsePoolSpec ¶
func ParsePoolSpec(poolString string) (*cilium_v2alpha1.IPv4PoolSpec, *cilium_v2alpha1.IPv6PoolSpec, error)
ParsePoolSpec parses a pool spec string in the form "ipv4-cidrs:172.16.0.0/16,172.17.0.0/16;ipv4-mask-size:24".
func UpsertPool ¶
func UpsertPool(allocator *PoolAllocator, name string, v4Spec *cilium_v2alpha1.IPv4PoolSpec, v6Spec *cilium_v2alpha1.IPv6PoolSpec) error
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
func (*Allocator) DeletePool ¶
func (a *Allocator) DeletePool(ctx context.Context, pool *cilium_v2alpha1.CiliumPodIPPool) error
func (*Allocator) UpsertPool ¶
func (a *Allocator) UpsertPool(ctx context.Context, pool *cilium_v2alpha1.CiliumPodIPPool) error
type NodeHandler ¶
type NodeHandler struct {
// contains filtered or unexported fields
}
func NewNodeHandler ¶
func NewNodeHandler( name string, logger *slog.Logger, manager *PoolAllocator, cnClient cilium_v2.CiliumNodeInterface, poolsFromResource v2.PoolsFromResourceFunc, ) *NodeHandler
func (*NodeHandler) Delete ¶
func (n *NodeHandler) Delete(resource *v2.CiliumNode)
func (*NodeHandler) Stop ¶
func (n *NodeHandler) Stop()
func (*NodeHandler) Upsert ¶
func (n *NodeHandler) Upsert(resource *v2.CiliumNode)
type PoolAllocator ¶
type PoolAllocator struct {
// contains filtered or unexported fields
}
func NewPoolAllocator ¶
func NewPoolAllocator(logger *slog.Logger, enableIPv4, enableIPv6 bool) *PoolAllocator
func (*PoolAllocator) AllocateToNode ¶
func (p *PoolAllocator) AllocateToNode(nodeName string, pools *types.IPAMPoolSpec) error
func (*PoolAllocator) AllocatedPools ¶
func (p *PoolAllocator) AllocatedPools(targetNode string) (pools []types.IPAMPoolAllocation)
func (*PoolAllocator) DeletePool ¶
func (p *PoolAllocator) DeletePool(poolName string) error
DeletePool deletes a pool from p. No new allocations to nodes will be made from the pool and all internal bookkeeping is removed. However, nodes will still retain their in-flight CIDRs until next time the respective CiliumNode is updated.
func (*PoolAllocator) ReleaseNode ¶
func (p *PoolAllocator) ReleaseNode(nodeName string) error
func (*PoolAllocator) RestoreFinished ¶
func (p *PoolAllocator) RestoreFinished()
func (*PoolAllocator) UpsertPool ¶
Click to show internal directories.
Click to hide internal directories.