Documentation ¶
Index ¶
Constants ¶
View Source
const ( // IP Acquire operation identifier Acquire = 0 // IP Release operation identifier Release = 1 UnnamedNetwork string = "" // kubermetes client-go rate limiter settings // https://pkg.go.dev/k8s.io/client-go@v0.27.2/rest#Config KubernetesClientQPS = 100 KubernetesClientBurst = 200 // RequestTimeout for IPAM queries IpamRequestTimeout = 10 * time.Second // DatastoreRetries defines how many retries are attempted when reading/updating the IP Pool DatastoreRetries = 5 DatastoreRetriesDelay = 100 * time.Millisecond DefaultLeaderLeaseDurationMs = 3000 DefaultLeaderRenewDeadlineMs = 2500 DefaultLeaderRetryPeriodMs = 2000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Set of kubernetets clients
type IPAM ¶
type IPAM struct { Client Config IPAMConfig }
type IPAMConfig ¶
type IPAMConfig struct { Routes []*cnitypes.Route `json:"routes"` IPRanges []RangeConfiguration `json:"ipRanges"` OmitRanges []string `json:"exclude,omitempty"` DNS cnitypes.DNS `json:"dns"` Range string `json:"range"` RangeStart net.IP `json:"range_start,omitempty"` RangeEnd net.IP `json:"range_end,omitempty"` NetworkNamespace string NetworkName string `json:"network_name,omitempty"` }
IPAMConfig describes the expected json configuration for this plugin
func LoadFromNad ¶
func LoadFromNad(nadConfig string, nadNamespace string) (*IPAMConfig, error)
Load Network Attachment Definition and parse config to fill IPAM config
type Nad ¶
type Nad struct {
IPAM *IPAMConfig `json:"ipam"`
}
type NeonvmIPPool ¶
type NeonvmIPPool struct {
// contains filtered or unexported fields
}
NeonvmIPPool represents an IPPool resource and its parsed set of allocations
func (*NeonvmIPPool) Allocations ¶
func (p *NeonvmIPPool) Allocations(ctx context.Context) []whereaboutstypes.IPReservation
Allocations returns the initially retrieved set of allocations for this pool
func (*NeonvmIPPool) Update ¶
func (p *NeonvmIPPool) Update(ctx context.Context, reservation []whereaboutstypes.IPReservation) error
Update NeonvmIPPool with new IP reservation
type RangeConfiguration ¶
Click to show internal directories.
Click to hide internal directories.