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, poolName, containerID, nic string, pod *corev1.Pod) (*models.IPConfig, error)
ReleaseIP(ctx context.Context, poolName string, ipAndCIDs []IPAndCID) error
ListAllIPPools(ctx context.Context) (*spiderpoolv1.IPPoolList, error)
SelectByPod(ctx context.Context, version types.IPVersion, poolName string, pod *corev1.Pod) (bool, error)
CheckVlanSame(ctx context.Context, poolList []string) (map[types.Vlan][]string, bool, error)
GetIPPoolByName(ctx context.Context, podName string) (*spiderpoolv1.IPPool, error)
RemoveFinalizer(ctx context.Context, poolName string) error
AssembleTotalIPs(ctx context.Context, ipPool *spiderpoolv1.IPPool) ([]net.IP, error)
SetupReconcile(leader election.SpiderLeaseElector) error
SetupWebhook() error
}
func NewIPPoolManager ¶
func NewIPPoolManager(mgr ctrl.Manager, rIPManager reservedipmanager.ReservedIPManager, nodeManager nodemanager.NodeManager, nsManager namespacemanager.NamespaceManager, podManager podmanager.PodManager, maxAllocatedIPs, maxConflictRetrys int, conflictRetryUnitTime time.Duration) (IPPoolManager, error)
Click to show internal directories.
Click to hide internal directories.