Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClusterNameKey = "cluster.x-k8s.io/cluster-name" ClusterNetworkNameKey = "cluster.x-k8s.io/network-name" // group is used to identify the pool, for eg., 'dev/test/prod' or 'team1/team2' ClusterIPPoolNameKey = "cluster.x-k8s.io/ip-pool-name" ClusterIPPoolGroupKey = "cluster.x-k8s.io/ip-pool-group" ClusterIPPoolNamespaceKey = "cluster.x-k8s.io/ip-pool-namespace" // comma-separated list of search domains SearchDomainsKey = "cluster.x-k8s.io/dns-search-domains" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPAddress ¶
type IPAddress interface { // gets the ip address name GetName() string // gets the reference to the ip claim to generate the ip address, if any GetClaim() (*corev1.ObjectReference, error) // gets the reference to the ip pool from which the ip address is generated GetPool() (corev1.ObjectReference, error) // gets the mask of the network as integer (max 128) GetMask() (int, error) // gets the gateway ip address GetGateway() (IPAddressStr, error) // gets ip address GetAddress() (IPAddressStr, error) // gets dnsServers GetDnsServers() ([]IPAddressStr, error) // gets searchDomains GetSearchDomains() ([]string, error) }
type IPAddressManager ¶
type IPAddressManager interface { // gets the allocated static ip by name GetIP(name string, pool IPPool) (IPAddress, error) // creates/requests a new static ip for the resource, if it does not exist // source ip pool is fetched using optional poolSelector, default is using poolKey AllocateIP(name string, pool IPPool, ownerObj runtime.Object) (IPAddress, error) // releases static ip back to the ip pool DeallocateIP(name string, pool IPPool, ownerObj runtime.Object) error // gets an available ip pool in the cluster namespace GetAvailableIPPool(poolMatchLabels map[string]string, clusterMeta metav1.ObjectMeta) (IPPool, error) }
type IPAddressStr ¶
type IPAddressStr string
type IPPool ¶
type IPPool interface { GetName() string GetNamespace() string GetClusterName() (*string, error) GetPools() ([]Pool, error) GetPreAllocations() (map[string]IPAddressStr, error) GetPrefix() (int, error) GetGateway() (*IPAddressStr, error) GetDNSServers() ([]IPAddressStr, error) GetSearchDomains() ([]string, error) GetNamePrefix() (string, error) }
type IPSubnetStr ¶
type IPSubnetStr string
type NewIpamFunc ¶
type NewIpamFunc func(cli client.Client, log logr.Logger) IPAddressManager
function to create a new IPAM
type Pool ¶
type Pool interface { GetStart() (*IPAddressStr, error) GetEnd() (*IPAddressStr, error) GetSubnet() (*IPSubnetStr, error) GetPrefix() (int, error) GetGateway() (*IPAddressStr, error) GetDNSServers() ([]IPAddressStr, error) }
Click to show internal directories.
Click to hide internal directories.