allocator

package
v0.0.0-...-cd4954e Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAllocator

type IPAllocator struct {
	BackendClient backend.Backend
	// contains filtered or unexported fields
}

IPAllocator allocates IP addresses from IPPools in etcd

func NewIPAllocator

func NewIPAllocator(config *types.IPAMConfig) (*IPAllocator, error)

NewIPAllocator returns a new IPAllocator from the given etcd client

func (*IPAllocator) AllocateIP

func (alloc *IPAllocator) AllocateIP(nameSpace, nsIpPoolNames, podName string) (*current.IPConfig, *types.NSIPPool, error)

func (*IPAllocator) AllocateSvcSpecified

func (alloc *IPAllocator) AllocateSvcSpecified(fixed bool, nameSpace, serviceIPPoolName, podName, stsName string) (*current.IPConfig, *types.NSIPPool, error)

AllocateSvcSpecified returns an IP address and its svcIPPOOL if success.

func (*IPAllocator) Close

func (alloc *IPAllocator) Close()

func (*IPAllocator) Release

func (alloc *IPAllocator) Release(nameSpace, podName string, releaseFixed bool) error

Release remove an IP usage record from etcd if not fixed, for fixed IP, Release tags the IP with "delete" flag

Jump to

Keyboard shortcuts

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