vip

package
v0.0.0-...-58e557b Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocatePodIP

func AllocatePodIP(client *k8sclient.ClientInfo, name, namespace, podName string) (string, error)

func ClearVIPConf

func ClearVIPConf(NADName, cmName, namespace, nodeUUID string, VIPs []string, stopCh <-chan struct{})

func CreateVIPCMName

func CreateVIPCMName(NADName string) string

func GetVIPConfForVxNet

func GetVIPConfForVxNet(NADName, namespace, IPStart, IPEnd, vxNet string) (map[string]string, error)

func PrintErrReason

func PrintErrReason(err error, desc string)

func ReleasePodIP

func ReleasePodIP(client *k8sclient.ClientInfo, name, namespace, podName string) error

Detach Pod Ref VIP info

func TryFreeVIP

func TryFreeVIP(NADName, namespace string, stopCh <-chan struct{}) error

Types

type VIPAllocMap

type VIPAllocMap struct {
	TagToDelete    bool
	IPStart        string
	IPEnd          string
	VIPDetailInfo  map[string]*VIPInfo
	LastUpdateTime int64
	NodeUUID       string
}

Data Field Value in ConfigMap

func (*VIPAllocMap) AddRefPodVIPInfo

func (v *VIPAllocMap) AddRefPodVIPInfo(podName string) (allocIP string, err error)

func (*VIPAllocMap) CheckFreeVIP

func (v *VIPAllocMap) CheckFreeVIP() error

func (*VIPAllocMap) CreateCMData

func (v *VIPAllocMap) CreateCMData() string

func (*VIPAllocMap) GetPodCount

func (v *VIPAllocMap) GetPodCount() int

func (*VIPAllocMap) InitRefPodVIPInfo

func (v *VIPAllocMap) InitRefPodVIPInfo(VIPInfoMap map[string]*VIPInfo)

func (*VIPAllocMap) IsInitialized

func (v *VIPAllocMap) IsInitialized() bool

func (*VIPAllocMap) PrepareToDelete

func (v *VIPAllocMap) PrepareToDelete(nodeUUID string) []string

func (*VIPAllocMap) ReadyToDelete

func (v *VIPAllocMap) ReadyToDelete(nodeUUID string) bool

func (*VIPAllocMap) RemoveRefPodVIPInfo

func (v *VIPAllocMap) RemoveRefPodVIPInfo(podName string)

type VIPInfo

type VIPInfo struct {
	ID         string
	RefPodName string
}

Jump to

Keyboard shortcuts

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