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
- func NormalizeIP(ip net.IP, networkName string) string
- type Client
- func (i *Client) DeleteOverlappingIP(clusterWideIP *whereaboutsv1alpha1.OverlappingRangeIPReservation) error
- func (i *Client) GetPod(namespace, name string) (*v1.Pod, error)
- func (i *Client) ListIPPools() ([]storage.IPPool, error)
- func (i *Client) ListOverlappingIPs() ([]whereaboutsv1alpha1.OverlappingRangeIPReservation, error)
- func (i *Client) ListPods() ([]v1.Pod, error)
- type KubernetesIPAM
- type KubernetesIPPool
- type KubernetesOverlappingRangeStore
- func (c *KubernetesOverlappingRangeStore) GetOverlappingRangeIPReservation(ctx context.Context, ip net.IP, podRef, networkName string) (*whereaboutsv1alpha1.OverlappingRangeIPReservation, error)
- func (c *KubernetesOverlappingRangeStore) UpdateOverlappingRangeAllocation(ctx context.Context, mode int, ip net.IP, podRef, ifName, networkName string) error
- 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) ([]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 NewKubernetesClient(k8sClient wbclient.Interface, k8sClientSet kubernetes.Interface) *Client
func (*Client) DeleteOverlappingIP ¶
func (i *Client) DeleteOverlappingIP(clusterWideIP *whereaboutsv1alpha1.OverlappingRangeIPReservation) error
func (*Client) ListOverlappingIPs ¶
func (i *Client) ListOverlappingIPs() ([]whereaboutsv1alpha1.OverlappingRangeIPReservation, error)
type KubernetesIPAM ¶
type KubernetesIPAM struct { Client Config whereaboutstypes.IPAMConfig IfName string // contains filtered or unexported fields }
KubernetesIPAM manages ip blocks in an kubernetes CRD backend
func NewKubernetesIPAM ¶
func NewKubernetesIPAM(containerID, ifName 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, ifName 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) GetOverlappingRangeIPReservation ¶ added in v0.8.0
func (c *KubernetesOverlappingRangeStore) GetOverlappingRangeIPReservation(ctx context.Context, ip net.IP, podRef, networkName string) (*whereaboutsv1alpha1.OverlappingRangeIPReservation, error)
IsAllocatedInOverlappingRange checks for IP addresses to see if they're allocated cluster wide, for overlapping ranges. First return value is true if the IP is allocated, second return value is true if the IP is allocated to the current podRef
func (*KubernetesOverlappingRangeStore) UpdateOverlappingRangeAllocation ¶
func (c *KubernetesOverlappingRangeStore) UpdateOverlappingRangeAllocation(ctx context.Context, mode int, ip net.IP, podRef, ifName, networkName string) error
UpdateOverlappingRangeAllocation updates clusterwide allocation for overlapping ranges.