Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WebhookHealthyCheck ¶ added in v0.0.6
WebhookHealthyCheck servers for spiderpool controller readiness and liveness probe
Types ¶
type IPPoolManager ¶
type IPPoolManager interface {
GetIPPoolByName(ctx context.Context, poolName string) (*spiderpoolv1.SpiderIPPool, error)
ListIPPools(ctx context.Context, opts ...client.ListOption) (*spiderpoolv1.SpiderIPPoolList, error)
AllocateIP(ctx context.Context, poolName, containerID, nic string, pod *corev1.Pod) (*models.IPConfig, *spiderpoolv1.SpiderIPPool, error)
ReleaseIP(ctx context.Context, poolName string, ipAndCIDs []IPAndCID) error
SelectByPod(ctx context.Context, version types.IPVersion, poolName string, pod *corev1.Pod) (bool, error)
CheckVlanSame(ctx context.Context, poolNameList []string) (map[types.Vlan][]string, bool, error)
RemoveFinalizer(ctx context.Context, poolName string) error
AssembleTotalIPs(ctx context.Context, ipPool *spiderpoolv1.SpiderIPPool) ([]net.IP, error)
SetupReconcile(leader election.SpiderLeaseElector) error
SetupWebhook() error
UpdateAllocatedIPs(ctx context.Context, containerID string, pod *corev1.Pod, oldIPConfig models.IPConfig) 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.