package cidrset
import "k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset"
Index ¶
Variables ¶
var ( // ErrCIDRRangeNoCIDRsRemaining occurs when there is no more space // to allocate CIDR ranges. ErrCIDRRangeNoCIDRsRemaining = errors.New( "CIDR allocation failed; there are no remaining CIDRs left to allocate in the accepted range") // ErrCIDRSetSubNetTooBig occurs when the subnet mask size is too // big compared to the CIDR mask size. ErrCIDRSetSubNetTooBig = errors.New( "New CIDR set failed; the node CIDR size is too big") )
Types ¶
type CidrSet ¶
CidrSet manages a set of CIDR ranges from which blocks of IPs can be allocated from.
func NewCIDRSet ¶
NewCIDRSet creates a new CidrSet.
func (*CidrSet) AllocateNext ¶
AllocateNext allocates the next free CIDR range. This will set the range as occupied and return the allocated range.
func (*CidrSet) Occupy ¶
Occupy marks the given CIDR range as used. Occupy succeeds even if the CIDR range was previously used.
func (*CidrSet) Release ¶
Release releases the given CIDR range.
Source Files ¶
cidr_set.go metrics.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 3 hours ago –
Tools for package owners.