multipool

package
v1.20.0-pre.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

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

func (n *NodeHandler) Resync(context.Context, time.Time)

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

func (p *PoolAllocator) UpsertPool(poolName string, ipv4CIDRs []string, ipv4MaskSize int, ipv6CIDRs []string, ipv6MaskSize int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL