v1alpha1

package
v1.31.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPPoolManager

type IPPoolManager struct {
	// contains filtered or unexported fields
}

IPPoolManager defines an ippool manager working with v1alpha1 ippool CR

func NewIPPoolManager

func NewIPPoolManager(config *rest.Config, clusterNS string) (*IPPoolManager, error)

NewIPPoolManager initializes an IPPoolManager

func NewIPPoolManagerWithClients

func NewIPPoolManagerWithClients(clients t1networkingclients.Interface, clusterNS string) (*IPPoolManager, error)

NewIPPoolManagerWithClients initializes a IPPoolManager with clientset

func (*IPPoolManager) AddSubnetToIPPool

func (p *IPPoolManager) AddSubnetToIPPool(node *corev1.Node, ippool helper.NSXIPPool, ownerRef *metav1.OwnerReference) error

AddSubnetToIPPool adds the subnet for specific node to ippool CR. The subnet name is the node name

func (*IPPoolManager) CreateIPPool

func (p *IPPoolManager) CreateIPPool(clusterNS, clusterName string, ownerRef *metav1.OwnerReference) (helper.NSXIPPool, error)

CreateIPPool creates an ippool CR to a namespace, for a workload cluster

func (*IPPoolManager) DeleteSubnetFromIPPool

func (p *IPPoolManager) DeleteSubnetFromIPPool(subnetName string, ippool helper.NSXIPPool) error

DeleteSubnetFromIPPool removes the subnet for specific node from ippool CR

func (*IPPoolManager) DiffIPPoolSubnets

func (p *IPPoolManager) DiffIPPoolSubnets(old, cur helper.NSXIPPool) bool

DiffIPPoolSubnets validates if subnets of status in ippool CR changes

func (*IPPoolManager) GetIPPool

func (p *IPPoolManager) GetIPPool(clusterNS, clusterName string) (helper.NSXIPPool, error)

GetIPPool gets the ippool CR from a namespace, belonged to a workload cluster

func (*IPPoolManager) GetIPPoolFromIndexer

func (p *IPPoolManager) GetIPPoolFromIndexer(key string) (helper.NSXIPPool, error)

GetIPPoolFromIndexer gets an ippool CR from cache store

func (*IPPoolManager) GetIPPoolInformer

func (p *IPPoolManager) GetIPPoolInformer() cache.SharedIndexInformer

GetIPPoolInformer gets ippool informer

func (*IPPoolManager) GetIPPoolListerSynced

func (p *IPPoolManager) GetIPPoolListerSynced() cache.InformerSynced

GetIPPoolListerSynced gets HasSynced function

func (*IPPoolManager) GetIPPoolSubnets

func (p *IPPoolManager) GetIPPoolSubnets(ippool helper.NSXIPPool) (map[string]string, error)

GetIPPoolSubnets gets the subnets from realized status in ippool CR

func (*IPPoolManager) StartIPPoolInformers

func (p *IPPoolManager) StartIPPoolInformers()

StartIPPoolInformers starts ippool informers

func (*IPPoolManager) UpdateIPPool

func (p *IPPoolManager) UpdateIPPool(ippool *t1networkingapis.IPPool) (*t1networkingapis.IPPool, error)

UpdateIPPool updates a kubernetes ippool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL