Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // RequestTimeout defines how long the context timesout in RequestTimeout = 10 * time.Second // DatastoreRetries defines how many retries are attempted when updating the Pool DatastoreRetries = 100 )
var ( // DialTimeout defines how long we dial etcd DialTimeout = 2 * time.Second )
Functions ¶
Types ¶
type ETCDIPAM ¶
type ETCDIPAM struct {
// contains filtered or unexported fields
}
ETCDIPAM manages ip blocks in an etcd backend
func NewETCDIPAM ¶
NewETCDIPAM returns a new IPAM Client configured to an etcd backend
func (*ETCDIPAM) GetOverlappingRangeStore ¶
func (i *ETCDIPAM) GetOverlappingRangeStore() (OverlappingRangeStore, error)
GetOverlappingRangeStore returns an OverlappingRangeStore interface
type ETCDIPPool ¶
type ETCDIPPool struct {
// contains filtered or unexported fields
}
ETCDIPPool represents a range and its parsed set of allocations
func (*ETCDIPPool) Allocations ¶
func (p *ETCDIPPool) Allocations() []types.IPReservation
Allocations returns the initially retrieved set of allocations for this pool
func (*ETCDIPPool) Update ¶
func (p *ETCDIPPool) Update(ctx context.Context, reservations []types.IPReservation) error
Update sets the pool allocated IP list to the given IP reservations
type EtcdOverlappingRangeStore ¶
type EtcdOverlappingRangeStore struct {
// contains filtered or unexported fields
}
EtcdOverlappingRangeStore represents a set of cluster wide resources
func (*EtcdOverlappingRangeStore) IsAllocatedInOverlappingRange ¶
func (i *EtcdOverlappingRangeStore) IsAllocatedInOverlappingRange(ctx context.Context, ip net.IP) (bool, error)
IsAllocatedInOverlappingRange checks to see if the IP is allocated across the whole cluster (and not just the current range)
func (*EtcdOverlappingRangeStore) UpdateOverlappingRangeAllocation ¶
func (i *EtcdOverlappingRangeStore) UpdateOverlappingRangeAllocation(ctx context.Context, mode int, ip net.IP, containerID string, podRef string) error
UpdateOverlappingRangeAllocation updates our clusterwide allocation for overlapping ranges.
type IPPool ¶
type IPPool interface { Allocations() []types.IPReservation Update(ctx context.Context, reservations []types.IPReservation) error }
IPPool is the interface that represents an manageable pool of allocated IPs
type OverlappingRangeStore ¶
type OverlappingRangeStore interface { IsAllocatedInOverlappingRange(ctx context.Context, ip net.IP) (bool, error) UpdateOverlappingRangeAllocation(ctx context.Context, mode int, ip net.IP, containerID string, podRef string) error }
OverlappingRangeStore is an interface for wrapping overlappingrange storage options
type Store ¶
type Store interface { GetIPPool(ctx context.Context, ipRange string) (IPPool, error) GetOverlappingRangeStore() (OverlappingRangeStore, error) Status(ctx context.Context) error Close() error }
Store is the interface that wraps the basic IP Allocation methods on the underlying storage backend