Documentation ¶
Overview ¶
Package ipam handles address allocation management
Index ¶
- Variables
- func NewIPNotAvailableInPoolError(ip net.IP) error
- type AllocationAction
- type AllocationImplementation
- type AllocationResult
- type Allocator
- type CiliumNodeGetterUpdater
- type Configuration
- type ErrAllocation
- type ErrIPNotAvailableInPool
- type Family
- type IPAM
- func (ipam *IPAM) AllocateIP(ip net.IP, owner string, pool Pool) error
- func (ipam *IPAM) AllocateIPString(ipAddr, owner string, pool Pool) error
- func (ipam *IPAM) AllocateIPWithoutSyncUpstream(ip net.IP, owner string, pool Pool) (*AllocationResult, error)
- func (ipam *IPAM) AllocateNext(family, owner string, pool Pool) (ipv4Result, ipv6Result *AllocationResult, err error)
- func (ipam *IPAM) AllocateNextFamily(family Family, owner string, pool Pool) (result *AllocationResult, err error)
- func (ipam *IPAM) AllocateNextFamilyWithoutSyncUpstream(family Family, owner string, pool Pool) (result *AllocationResult, err error)
- func (ipam *IPAM) AllocateNextWithExpiration(family, owner string, pool Pool, timeout time.Duration) (ipv4Result, ipv6Result *AllocationResult, err error)
- func (ipam *IPAM) DebugStatus() string
- func (ipam *IPAM) Dump() (allocv4 map[string]string, allocv6 map[string]string, status string)
- func (ipam *IPAM) ExcludeIP(ip net.IP, owner string, pool Pool)
- func (ipam *IPAM) ReleaseIP(ip net.IP, pool Pool) error
- func (ipam *IPAM) StartExpirationTimer(ip net.IP, pool Pool, timeout time.Duration) (string, error)
- func (ipam *IPAM) StopExpirationTimer(ip net.IP, pool Pool, allocationUUID string) error
- func (ipam *IPAM) WithMetadata(m Metadata)
- type K8sEventRegister
- type Metadata
- type MetricsAPI
- type MetricsNodeAPI
- type MtuConfiguration
- type Node
- func (n *Node) GetNeededAddresses() int
- func (n *Node) InstanceID() (id string)
- func (n *Node) IsPrefixDelegationEnabled() bool
- func (n *Node) IsRunning() bool
- func (n *Node) MaintainIPPool(ctx context.Context) error
- func (n *Node) Ops() NodeOperations
- func (n *Node) Pool() (pool ipamTypes.AllocationMap)
- func (n *Node) PopulateIPReleaseStatus(node *v2.CiliumNode)
- func (n *Node) ResourceCopy() *v2.CiliumNode
- func (n *Node) SetOpts(ops NodeOperations)
- func (n *Node) SetPoolMaintainer(maintainer PoolMaintainer)
- func (n *Node) SetRunning(running bool)
- func (n *Node) Stats() Statistics
- func (n *Node) UpdatedResource(resource *v2.CiliumNode) bool
- type NodeManager
- func (n *NodeManager) ClusterSizeDependantInterval(baseInterval time.Duration) time.Duration
- func (n *NodeManager) Delete(resource *v2.CiliumNode)
- func (n *NodeManager) Get(nodeName string) *Node
- func (n *NodeManager) GetNames() (allNodeNames []string)
- func (n *NodeManager) GetNodesByIPWatermarkLocked() []*Node
- func (n *NodeManager) InstancesAPIIsReady() bool
- func (n *NodeManager) Resync(ctx context.Context, syncTime time.Time)
- func (n *NodeManager) SetInstancesAPIReadiness(ready bool)
- func (n *NodeManager) Start(ctx context.Context) error
- func (n *NodeManager) Upsert(resource *v2.CiliumNode)
- type NodeOperations
- type Owner
- type Pool
- type PoolMaintainer
- type ReleaseAction
- type Statistics
Constants ¶
This section is empty.
Variables ¶
var ( // ErrIPv4Disabled is returned when IPv4 allocation is disabled ErrIPv4Disabled = errors.New("IPv4 allocation disabled") // ErrIPv6Disabled is returned when Ipv6 allocation is disabled ErrIPv6Disabled = errors.New("IPv6 allocation disabled") )
Error definitions
Functions ¶
func NewIPNotAvailableInPoolError ¶
NewIPNotAvailableInPoolError returns an error resprenting the given IP not being available in the IPAM pool.
Types ¶
type AllocationAction ¶
type AllocationAction struct { // InterfaceID is set to the identifier describing the interface on // which the IPs must be allocated. This is optional, an IPAM // implementation can leave this empty to indicate that no interface // context is needed or a new interface must be created. InterfaceID string // Interface is the interface to allocate IPs on Interface ipamTypes.InterfaceRevision // PoolID is the IPAM pool identifier to allocate the IPs from. This // can correspond to a subnet ID or it can also left blank or set to a // value such as "global" to indicate a single address pool. PoolID ipamTypes.PoolID // AvailableForAllocation is the number IPs available for allocation. // If InterfaceID is set, then this number corresponds to the number of // IPs available for allocation on that interface. This number may be // lower than the number of IPs required to resolve the deficit. AvailableForAllocation int // MaxIPsToAllocate is set by the core IPAM layer before // NodeOperations.AllocateIPs() is called and defines the maximum // number of IPs to allocate in order to stay within the boundaries as // defined by NodeOperations.{ MinAllocate() | PreAllocate() | // getMaxAboveWatermark() }. MaxIPsToAllocate int // InterfaceCandidates is the number of attached interfaces with IPs // available for allocation. InterfaceCandidates int // EmptyInterfaceSlots is the number of empty interface slots available // for interfaces to be attached EmptyInterfaceSlots int }
AllocationAction is the action to be taken to resolve allocation deficits for a particular node. It is returned by NodeOperations.PrepareIPAllocation() and passed into NodeOperations.AllocateIPs().
type AllocationImplementation ¶
type AllocationImplementation interface { // CreateNode is called when the IPAM layer has learned about a new // node which requires IPAM services. This function must return a // NodeOperations implementation which will render IPAM services to the // node context provided. CreateNode(obj *v2.CiliumNode, node *Node) NodeOperations // GetPoolQuota is called to retrieve the remaining IP addresses in all // IP pools known to the IPAM implementation. GetPoolQuota() ipamTypes.PoolQuotaMap // Resync is called periodically to give the IPAM implementation a // chance to resync its own state with external APIs or systems. It is // also called when the IPAM layer detects that state got out of sync. Resync(ctx context.Context) time.Time // InstanceSync is called to sync the state of the specified instance with // external APIs or systems. InstanceSync(ctx context.Context, instanceID string) time.Time // HasInstance returns whether the instance is in instances HasInstance(instanceID string) bool // DeleteInstance deletes the instance from instances DeleteInstance(instanceID string) }
AllocationImplementation is the interface an implementation must provide. Other than NodeOperations, this implementation is not related to a node specifically.
type AllocationResult ¶
type AllocationResult struct { // IP is the allocated IP IP net.IP // IPPoolName is the IPAM pool from which the above IP was allocated from IPPoolName Pool // CIDRs is a list of all CIDRs to which the IP has direct access to. // This is primarily useful if the IP has been allocated out of a VPC // subnet range and the VPC provides routing to a set of CIDRs in which // the IP is routable. CIDRs []string // PrimaryMAC is the MAC address of the primary interface. This is useful // when the IP is a secondary address of an interface which is // represented on the node as a Linux device and all routing of the IP // must occur through that master interface. PrimaryMAC string // GatewayIP is the IP of the gateway which must be used for this IP. // If the allocated IP is derived from a VPC, then the gateway // represented the gateway of the VPC or VPC subnet. GatewayIP string // ExpirationUUID is the UUID of the expiration timer. This field is // only set if AllocateNextWithExpiration is used. ExpirationUUID string // InterfaceNumber is a field for generically identifying an interface. // This is only useful in ENI mode. InterfaceNumber string }
AllocationResult is the result of an allocation
type Allocator ¶
type Allocator interface { // Allocate allocates a specific IP or fails Allocate(ip net.IP, owner string, pool Pool) (*AllocationResult, error) // AllocateWithoutSyncUpstream allocates a specific IP without syncing // upstream or fails AllocateWithoutSyncUpstream(ip net.IP, owner string, pool Pool) (*AllocationResult, error) // Release releases a previously allocated IP or fails Release(ip net.IP, pool Pool) error // AllocateNext allocates the next available IP or fails if no more IPs // are available AllocateNext(owner string, pool Pool) (*AllocationResult, error) // AllocateNextWithoutSyncUpstream allocates the next available IP without syncing // upstream or fails if no more IPs are available AllocateNextWithoutSyncUpstream(owner string, pool Pool) (*AllocationResult, error) // Dump returns a map of all allocated IPs per pool with the IP represented as key in the // map. Dump must also provide a status one-liner to represent the overall status, e.g. // number of IPs allocated and overall health information if available. Dump() (map[Pool]map[string]string, string) // Capacity returns the total IPAM allocator capacity (not the current // available). Capacity() uint64 // RestoreFinished marks the status of restoration as done RestoreFinished() }
Allocator is the interface for an IP allocator implementation
type CiliumNodeGetterUpdater ¶
type CiliumNodeGetterUpdater interface { Create(node *v2.CiliumNode) (*v2.CiliumNode, error) Update(origResource, newResource *v2.CiliumNode) (*v2.CiliumNode, error) UpdateStatus(origResource, newResource *v2.CiliumNode) (*v2.CiliumNode, error) Get(name string) (*v2.CiliumNode, error) }
CiliumNodeGetterUpdater defines the interface used to interact with the k8s apiserver to retrieve and update the CiliumNode custom resource
type Configuration ¶
type Configuration interface { // IPv4Enabled must return true when IPv4 is enabled IPv4Enabled() bool // IPv6 must return true when IPv6 is enabled IPv6Enabled() bool // IPAMMode returns the IPAM mode IPAMMode() string // HealthCheckingEnabled must return true when health-checking is // enabled HealthCheckingEnabled() bool // UnreachableRoutesEnabled returns true when unreachable-routes is // enabled UnreachableRoutesEnabled() bool // SetIPv4NativeRoutingCIDR is called by the IPAM module to announce // the native IPv4 routing CIDR if it exists SetIPv4NativeRoutingCIDR(cidr *cidr.CIDR) // IPv4NativeRoutingCIDR is called by the IPAM module retrieve // the native IPv4 routing CIDR if it exists GetIPv4NativeRoutingCIDR() *cidr.CIDR }
Configuration is the configuration passed into the IPAM subsystem
type ErrAllocation ¶
type ErrAllocation error
type ErrIPNotAvailableInPool ¶
type ErrIPNotAvailableInPool struct {
// contains filtered or unexported fields
}
ErrIPNotAvailableInPool represents an error when an IP is not available in the pool.
func (*ErrIPNotAvailableInPool) Error ¶
func (e *ErrIPNotAvailableInPool) Error() string
func (*ErrIPNotAvailableInPool) Is ¶
func (e *ErrIPNotAvailableInPool) Is(target error) bool
Is provides this error type with the logic for use with errors.Is.
type Family ¶
type Family string
Family is the type describing all address families support by the IP allocation manager
func DeriveFamily ¶
DeriveFamily derives the address family of an IP
type IPAM ¶
type IPAM struct { IPv6Allocator Allocator IPv4Allocator Allocator // contains filtered or unexported fields }
IPAM is the configuration used for a particular IPAM type.
func NewIPAM ¶
func NewIPAM(nodeAddressing types.NodeAddressing, c Configuration, owner Owner, k8sEventReg K8sEventRegister, node agentK8s.LocalCiliumNodeResource, mtuConfig MtuConfiguration, clientset client.Clientset) *IPAM
NewIPAM returns a new IP address manager
func (*IPAM) AllocateIP ¶
AllocateIP allocates a IP address.
func (*IPAM) AllocateIPString ¶
AllocateIPString is identical to AllocateIP but takes a string
func (*IPAM) AllocateIPWithoutSyncUpstream ¶
func (ipam *IPAM) AllocateIPWithoutSyncUpstream(ip net.IP, owner string, pool Pool) (*AllocationResult, error)
AllocateIPWithoutSyncUpstream allocates a IP address without syncing upstream.
func (*IPAM) AllocateNext ¶
func (ipam *IPAM) AllocateNext(family, owner string, pool Pool) (ipv4Result, ipv6Result *AllocationResult, err error)
AllocateNext allocates the next available IPv4 and IPv6 address out of the configured address pool. If family is set to "ipv4" or "ipv6", then allocation is limited to the specified address family. If the pool has been drained of addresses, an error will be returned.
func (*IPAM) AllocateNextFamily ¶
func (ipam *IPAM) AllocateNextFamily(family Family, owner string, pool Pool) (result *AllocationResult, err error)
AllocateNextFamily allocates the next IP of the requested address family
func (*IPAM) AllocateNextFamilyWithoutSyncUpstream ¶
func (ipam *IPAM) AllocateNextFamilyWithoutSyncUpstream(family Family, owner string, pool Pool) (result *AllocationResult, err error)
AllocateNextFamilyWithoutSyncUpstream allocates the next IP of the requested address family without syncing upstream
func (*IPAM) AllocateNextWithExpiration ¶
func (ipam *IPAM) AllocateNextWithExpiration(family, owner string, pool Pool, timeout time.Duration) (ipv4Result, ipv6Result *AllocationResult, err error)
AllocateNextWithExpiration is identical to AllocateNext but registers an expiration timer as well. This is identical to using AllocateNext() in combination with StartExpirationTimer()
func (*IPAM) DebugStatus ¶
DebugStatus implements debug.StatusObject to provide debug status collection ability
func (*IPAM) ExcludeIP ¶
ExcludeIP ensures that a certain IP is never allocated. It is preferred to use this method instead of allocating the IP as the allocation block can change and suddenly cover the IP to be excluded.
func (*IPAM) ReleaseIP ¶
ReleaseIP release a IP address. The pool argument must not be empty, it must be set to the pool name returned by the `Allocate*` functions when the IP was allocated.
func (*IPAM) StartExpirationTimer ¶
StartExpirationTimer installs an expiration timer for a previously allocated IP. Unless StopExpirationTimer is called in time, the IP will be released again after expiration of the specified timeout. The function will return a UUID representing the unique allocation attempt. The same UUID must be passed into StopExpirationTimer again.
This function is to be used as allocation and use of an IP can be controlled by an external entity and that external entity can disappear. Therefore such users should register an expiration timer before returning the IP and then stop the expiration timer when the IP has been used.
func (*IPAM) StopExpirationTimer ¶
StopExpirationTimer will remove the expiration timer for a particular IP. The UUID returned by the symmetric StartExpirationTimer must be provided. The expiration timer will only be removed if the UUIDs match. Releasing an IP will also stop the expiration timer.
func (*IPAM) WithMetadata ¶
WithMetadata sets an optional Metadata provider, which IPAM will use to determine what IPAM pool an IP owner should allocate its IP from
type K8sEventRegister ¶
type K8sEventRegister interface { // K8sEventReceived is called to do metrics accounting for received // Kubernetes events, as well as calculating timeouts for k8s watcher // cache sync. K8sEventReceived(apiGroupResourceName string, scope string, action string, valid, equal bool) // K8sEventProcessed is called to do metrics accounting for each processed // Kubernetes event. K8sEventProcessed(scope string, action string, status bool) }
K8sEventRegister is used to register and handle events as they are processed by K8s controllers.
type MetricsAPI ¶
type MetricsAPI interface { MetricsNodeAPI AllocationAttempt(typ, status, subnetID string, observe float64) ReleaseAttempt(typ, status, subnetID string, observe float64) IncInterfaceAllocation(subnetID string) AddIPAllocation(subnetID string, allocated int64) AddIPRelease(subnetID string, released int64) SetAllocatedIPs(typ string, allocated int) SetAvailableInterfaces(available int) SetInterfaceCandidates(interfaceCandidates int) SetEmptyInterfaceSlots(emptyInterfaceSlots int) SetAvailableIPsPerSubnet(subnetID string, availabilityZone string, available int) SetNodes(category string, nodes int) IncResyncCount() PoolMaintainerTrigger() trigger.MetricsObserver K8sSyncTrigger() trigger.MetricsObserver ResyncTrigger() trigger.MetricsObserver }
MetricsAPI represents the metrics being maintained by a NodeManager
type MetricsNodeAPI ¶
type MtuConfiguration ¶
type MtuConfiguration interface {
GetDeviceMTU() int
}
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a Kubernetes node running Cilium with an associated CiliumNode custom resource
func (*Node) GetNeededAddresses ¶
GetNeededAddresses returns the number of needed addresses that need to be allocated or released. A positive number is returned to indicate allocation. A negative number is returned to indicate release of addresses.
func (*Node) InstanceID ¶
InstanceID returns the instance ID of the node
func (*Node) IsPrefixDelegationEnabled ¶
func (*Node) MaintainIPPool ¶
MaintainIPPool attempts to allocate or release all required IPs to fulfill the needed gap. If required, interfaces are created.
func (*Node) Ops ¶
func (n *Node) Ops() NodeOperations
Ops returns the IPAM implementation operations for the node
func (*Node) Pool ¶
func (n *Node) Pool() (pool ipamTypes.AllocationMap)
Pool returns the IP allocation pool available to the node
func (*Node) PopulateIPReleaseStatus ¶
func (n *Node) PopulateIPReleaseStatus(node *v2.CiliumNode)
PopulateIPReleaseStatus Updates cilium node IPAM status with excess IP release data
func (*Node) ResourceCopy ¶
func (n *Node) ResourceCopy() *v2.CiliumNode
ResourceCopy returns a deep copy of the CiliumNode custom resource associated with the node
func (*Node) SetOpts ¶
func (n *Node) SetOpts(ops NodeOperations)
func (*Node) SetPoolMaintainer ¶
func (n *Node) SetPoolMaintainer(maintainer PoolMaintainer)
func (*Node) SetRunning ¶
func (*Node) UpdatedResource ¶
func (n *Node) UpdatedResource(resource *v2.CiliumNode) bool
UpdatedResource is called when an update to the CiliumNode has been received. The IPAM layer will attempt to immediately resolve any IP deficits and also trigger the background sync to continue working in the background to resolve any deficits or excess.
type NodeManager ¶
type NodeManager struct {
// contains filtered or unexported fields
}
NodeManager manages all nodes with ENIs
func NewNodeManager ¶
func NewNodeManager(instancesAPI AllocationImplementation, k8sAPI CiliumNodeGetterUpdater, metrics MetricsAPI, parallelWorkers int64, releaseExcessIPs bool, prefixDelegation bool) (*NodeManager, error)
NewNodeManager returns a new NodeManager
func (*NodeManager) ClusterSizeDependantInterval ¶
func (n *NodeManager) ClusterSizeDependantInterval(baseInterval time.Duration) time.Duration
func (*NodeManager) Delete ¶
func (n *NodeManager) Delete(resource *v2.CiliumNode)
Delete is called after a CiliumNode resource has been deleted via the Kubernetes apiserver
func (*NodeManager) Get ¶
func (n *NodeManager) Get(nodeName string) *Node
Get returns the node with the given name
func (*NodeManager) GetNames ¶
func (n *NodeManager) GetNames() (allNodeNames []string)
GetNames returns the list of all node names
func (*NodeManager) GetNodesByIPWatermarkLocked ¶
func (n *NodeManager) GetNodesByIPWatermarkLocked() []*Node
GetNodesByIPWatermarkLocked returns all nodes that require addresses to be allocated or released, sorted by the number of addresses needed to be operated in descending order. Number of addresses to be released is negative value so that nodes with IP deficit are resolved first The caller must hold the NodeManager lock
func (*NodeManager) InstancesAPIIsReady ¶
func (n *NodeManager) InstancesAPIIsReady() bool
InstancesAPIIsReady returns true if the instances API is stable and ready
func (*NodeManager) Resync ¶
func (n *NodeManager) Resync(ctx context.Context, syncTime time.Time)
Resync will attend all nodes and resolves IP deficits. The order of attendance is defined by the number of IPs needed to reach the configured watermarks. Any updates to the node resource are synchronized to the Kubernetes apiserver.
func (*NodeManager) SetInstancesAPIReadiness ¶
func (n *NodeManager) SetInstancesAPIReadiness(ready bool)
SetInstancesAPIReadiness sets the readiness state of the instances API
func (*NodeManager) Start ¶
func (n *NodeManager) Start(ctx context.Context) error
Start kicks of the NodeManager by performing the initial state synchronization and starting the background sync goroutine
func (*NodeManager) Upsert ¶
func (n *NodeManager) Upsert(resource *v2.CiliumNode)
Upsert is called whenever a CiliumNode resource has been updated in the Kubernetes apiserver. The CiliumNode will be created if it didn't exist before.
type NodeOperations ¶
type NodeOperations interface { // UpdateNode is called when an update to the CiliumNode is received. UpdatedNode(obj *v2.CiliumNode) // PopulateStatusFields is called to give the implementation a chance // to populate any implementation specific fields in CiliumNode.Status. PopulateStatusFields(resource *v2.CiliumNode) // CreateInterface is called to create a new interface. This is only // done if PrepareIPAllocation indicates that no more IPs are available // (AllocationAction.AvailableForAllocation == 0) for allocation but // interfaces are available for creation // (AllocationAction.EmptyInterfaceSlots > 0). This function must // create the interface *and* allocate up to // AllocationAction.MaxIPsToAllocate. CreateInterface(ctx context.Context, allocation *AllocationAction, scopedLog *logrus.Entry) (int, string, error) // ResyncInterfacesAndIPs is called to synchronize the latest list of // interfaces and IPs associated with the node. This function is called // sparingly as this information is kept in sync based on the success // of the functions AllocateIPs(), ReleaseIPs() and CreateInterface(). // It returns all available ip in node and remaining available interfaces // that can either be allocated or have not yet exhausted the instance specific quota of addresses // and error occurred during execution. ResyncInterfacesAndIPs(ctx context.Context, scopedLog *logrus.Entry) (ipamTypes.AllocationMap, ipamStats.InterfaceStats, error) // PrepareIPAllocation is called to calculate the number of IPs that // can be allocated on the node and whether a new network interface // must be attached to the node. PrepareIPAllocation(scopedLog *logrus.Entry) (*AllocationAction, error) // AllocateIPs is called after invoking PrepareIPAllocation and needs // to perform the actual allocation. AllocateIPs(ctx context.Context, allocation *AllocationAction) error // PrepareIPRelease is called to calculate whether any IP excess needs // to be resolved. It behaves identical to PrepareIPAllocation but // indicates a need to release IPs. PrepareIPRelease(excessIPs int, scopedLog *logrus.Entry) *ReleaseAction // ReleaseIPs is called after invoking PrepareIPRelease and needs to // perform the release of IPs. ReleaseIPs(ctx context.Context, release *ReleaseAction) error // GetMaximumAllocatableIPv4 returns the maximum amount of IPv4 addresses // that can be allocated to the instance GetMaximumAllocatableIPv4() int // GetMinimumAllocatableIPv4 returns the minimum amount of IPv4 addresses that // must be allocated to the instance. GetMinimumAllocatableIPv4() int // IsPrefixDelegated helps identify if a node supports prefix delegation IsPrefixDelegated() bool // GetUsedIPWithPrefixes returns the total number of used IPs including all IPs in a prefix if at-least one of // the prefix IPs is in use. GetUsedIPWithPrefixes() int }
NodeOperations is the interface an IPAM implementation must provide in order to provide IP allocation for a node. The structure implementing this API *must* be aware of the node connected to this implementation. This is achieved by considering the node context provided in AllocationImplementation.CreateNode() function and returning a NodeOperations implementation which performs operations in the context of that node.
type Owner ¶
type Owner interface { // UpdateCiliumNodeResource is called to create/update the CiliumNode // resource. The function must block until the custom resource has been // created. UpdateCiliumNodeResource() }
Owner is the interface the owner of an IPAM allocator has to implement
type Pool ¶
type Pool string
Pool is the the IP pool from which to allocate.
func PoolOrDefault ¶
PoolOrDefault returns the default pool if no pool is specified.
type PoolMaintainer ¶
type PoolMaintainer interface { Trigger() Shutdown() }
type ReleaseAction ¶
type ReleaseAction struct { // InterfaceID is set to the identifier describing the interface on // which the IPs must be released. This is optional, an IPAM // implementation can leave this empty to indicate that no interface // context is needed. InterfaceID string // PoolID is the IPAM pool identifier to release the IPs from. This can // correspond to a subnet ID or it can also left blank or set to a // value such as "global" to indicate a single address pool. PoolID ipamTypes.PoolID // IPsToRelease is the list of IPs to release IPsToRelease []string }
ReleaseAction is the action to be taken to resolve allocation excess for a particular node. It is returned by NodeOperations.PrepareIPRelease() and passed into NodeOperations.ReleaseIPs().
type Statistics ¶
type Statistics struct { // UsedIPs is the number of IPs currently in use UsedIPs int // AvailableIPs is the number of IPs currently allocated and available for assignment. AvailableIPs int // Capacity is the max inferred IPAM IP capacity for the node. // In theory, this provides an upper limit on the number of Cilium IPs that // this Node can support. Capacity int // NeededIPs is the number of IPs needed to reach the PreAllocate // watermwark NeededIPs int // ExcessIPs is the number of free IPs exceeding MaxAboveWatermark ExcessIPs int // RemainingInterfaces is the number of interfaces that can either be // allocated or have not yet exhausted the instance specific quota of // addresses RemainingInterfaces int // InterfaceCandidates is the number of attached interfaces with IPs // available for allocation. InterfaceCandidates int // EmptyInterfaceSlots is the number of empty interface slots available // for interfaces to be attached EmptyInterfaceSlots int }
Statistics represent the IP allocation statistics of a node