Documentation ¶
Index ¶
- Constants
- func IPManagement(ctx context.Context, mode int, ipamConf whereaboutstypes.IPAMConfig, ...) ([]net.IPNet, error)
- func IPManagementKubernetesUpdate(ctx context.Context, mode int, ipam *KubernetesIPAM, ...) ([]net.IPNet, error)
- func IPPoolName(poolIdentifier PoolIdentifier) string
- type Client
- func (i *Client) DeleteOverlappingIP(ctx context.Context, ...) error
- func (i *Client) GetPod(namespace, name string) (*v1.Pod, error)
- func (i *Client) ListIPPools(ctx context.Context) ([]storage.IPPool, error)
- func (i *Client) ListOverlappingIPs(ctx context.Context) ([]whereaboutsv1alpha1.OverlappingRangeIPReservation, error)
- func (i *Client) ListPods(ctx context.Context) ([]v1.Pod, error)
- type KubernetesIPAM
- type KubernetesIPPool
- type KubernetesOverlappingRangeStore
- type PoolIdentifier
Constants ¶
const UnnamedNetwork string = ""
Variables ¶
This section is empty.
Functions ¶
func IPManagement ¶
func IPManagement(ctx context.Context, mode int, ipamConf whereaboutstypes.IPAMConfig, client *KubernetesIPAM) ([]net.IPNet, error)
IPManagement manages ip allocation and deallocation from a storage perspective
func IPManagementKubernetesUpdate ¶
func IPManagementKubernetesUpdate(ctx context.Context, mode int, ipam *KubernetesIPAM, ipamConf whereaboutstypes.IPAMConfig, containerID string, podRef string) ([]net.IPNet, error)
IPManagementKubernetesUpdate manages k8s updates
func IPPoolName ¶ added in v0.6.2
func IPPoolName(poolIdentifier PoolIdentifier) string
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client has info on how to connect to the kubernetes cluster
func NewClientViaKubeconfig ¶
func NewKubernetesClient ¶ added in v0.6.1
func (*Client) DeleteOverlappingIP ¶
func (i *Client) DeleteOverlappingIP(ctx context.Context, clusterWideIP *whereaboutsv1alpha1.OverlappingRangeIPReservation) error
func (*Client) ListIPPools ¶
func (*Client) ListOverlappingIPs ¶
func (i *Client) ListOverlappingIPs(ctx context.Context) ([]whereaboutsv1alpha1.OverlappingRangeIPReservation, error)
type KubernetesIPAM ¶
type KubernetesIPAM struct { Client Config whereaboutstypes.IPAMConfig // contains filtered or unexported fields }
KubernetesIPAM manages ip blocks in an kubernetes CRD backend
func NewKubernetesIPAM ¶
func NewKubernetesIPAM(containerID string, ipamConf whereaboutstypes.IPAMConfig) (*KubernetesIPAM, error)
NewKubernetesIPAM returns a new KubernetesIPAM Client configured to a kubernetes CRD backend
func NewKubernetesIPAMWithNamespace ¶ added in v0.5.3
func NewKubernetesIPAMWithNamespace(containerID string, ipamConf whereaboutstypes.IPAMConfig, namespace string) (*KubernetesIPAM, error)
NewKubernetesIPAMWithNamespace returns a new KubernetesIPAM Client configured to a kubernetes CRD backend
func (*KubernetesIPAM) Close ¶
func (i *KubernetesIPAM) Close() error
Close partially implements the Store interface
func (*KubernetesIPAM) GetIPPool ¶
func (i *KubernetesIPAM) GetIPPool(ctx context.Context, poolIdentifier PoolIdentifier) (storage.IPPool, error)
GetIPPool returns a storage.IPPool for the given range
func (*KubernetesIPAM) GetOverlappingRangeStore ¶
func (i *KubernetesIPAM) GetOverlappingRangeStore() (storage.OverlappingRangeStore, error)
GetOverlappingRangeStore returns a clusterstore interface
type KubernetesIPPool ¶
type KubernetesIPPool struct {
// contains filtered or unexported fields
}
KubernetesIPPool represents an IPPool resource and its parsed set of allocations
func (*KubernetesIPPool) Allocations ¶
func (p *KubernetesIPPool) Allocations() []whereaboutstypes.IPReservation
Allocations returns the initially retrieved set of allocations for this pool
func (*KubernetesIPPool) Update ¶
func (p *KubernetesIPPool) Update(ctx context.Context, reservations []whereaboutstypes.IPReservation) error
Update sets the pool allocated IP list to the given IP reservations
type KubernetesOverlappingRangeStore ¶
type KubernetesOverlappingRangeStore struct {
// contains filtered or unexported fields
}
KubernetesOverlappingRangeStore represents a OverlappingRangeStore interface
func (*KubernetesOverlappingRangeStore) IsAllocatedInOverlappingRange ¶
func (c *KubernetesOverlappingRangeStore) IsAllocatedInOverlappingRange(ctx context.Context, ip net.IP, networkName string) (bool, error)
IsAllocatedInOverlappingRange checks for IP addresses to see if they're allocated cluster wide, for overlapping ranges.
func (*KubernetesOverlappingRangeStore) UpdateOverlappingRangeAllocation ¶
func (c *KubernetesOverlappingRangeStore) UpdateOverlappingRangeAllocation(ctx context.Context, mode int, ip net.IP, containerID, podRef, networkName string) error
UpdateOverlappingRangeAllocation updates clusterwide allocation for overlapping ranges.