Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPPoolManager ¶
type IPPoolManager interface {
AllocateIP(ctx context.Context, ownerType types.OwnerType, poolName, containerID, nic string, pod *corev1.Pod) (*models.IPConfig, error)
ReleaseIP(ctx context.Context, poolName string, ipAndCIDs []IPAndCID) error
ListAllIPPool(ctx context.Context) (*spiderpoolv1.IPPoolList, error)
SelectByPod(ctx context.Context, version string, poolName string, pod *corev1.Pod) (bool, error)
CheckVlanSame(ctx context.Context, poolList []string) (map[spiderpoolv1.Vlan][]string, bool, error)
CheckPoolCIDROverlap(ctx context.Context, poolList1 []string, poolList2 []string) (bool, error)
}
func NewIPPoolManager ¶
func NewIPPoolManager(c client.Client, rIPManager reservedipmanager.ReservedIPManager, nodeManager nodemanager.NodeManager, nsManager namespacemanager.NamespaceManager, podManager podmanager.PodManager, maxConflictRetrys, maxAllocatedIPs int) (IPPoolManager, error)
Click to show internal directories.
Click to hide internal directories.