aia

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReconcile

func NewReconcile(k8sClient client.Client, eventRecorder record.EventRecorder, controllerConfig *config.ControllerConfig, logger logr.Logger) (*reconciler, error)

Types

type Manger

type Manger interface {
	ProcessingEipType() string
	IsAiaNode(labels map[string]string, node *corev1.Node) bool
	IsCvmNeedToAllocateAnyCastIp(node *corev1.Node) (bool, error)
	GetAnycastIpByTags(nodeName string) (bool, string, error)
	GetOrCreateClusterUuidInCm() (string, error)
	AllocateAnycastIp(node *corev1.Node, additionalTags map[string]string) (string, error)
	AssociateAnycastIp(node *corev1.Node, anycastIpId string) error
	DisassociateAnycastIp(anycastIpId string) error
	ReleaseAnycastIp(anycastIpId string) error
}

Manger is not only take care of aia ip staff, but also HighQualityEIP

func NewAiaManager

func NewAiaManager(
	k8sClient client.Client,
	cvmClient *cvm.Client,
	vpcClient *vpc.Client,
	tagClient *tag.Client,
	record record.EventRecorder,
	clusterId string,
	bandwidth int64,
	anycastZone string,
	addressType string,
) (Manger, error)

type MangerImp

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

func (*MangerImp) AllocateAnycastIp

func (m *MangerImp) AllocateAnycastIp(node *corev1.Node, additionalTags map[string]string) (string, error)

func (*MangerImp) AssociateAnycastIp

func (m *MangerImp) AssociateAnycastIp(node *corev1.Node, anycastIpId string) error

func (*MangerImp) DisassociateAnycastIp

func (m *MangerImp) DisassociateAnycastIp(anycastIpId string) error

func (*MangerImp) GetAnycastIpByTags

func (m *MangerImp) GetAnycastIpByTags(nodeName string) (bool, string, error)

func (*MangerImp) GetOrCreateClusterUuidInCm

func (m *MangerImp) GetOrCreateClusterUuidInCm() (string, error)

func (*MangerImp) IsAiaNode

func (m *MangerImp) IsAiaNode(labels map[string]string, node *corev1.Node) bool

IsAiaNode will check if a node has labels that user specify in config file

func (*MangerImp) IsCvmNeedToAllocateAnyCastIp

func (m *MangerImp) IsCvmNeedToAllocateAnyCastIp(node *corev1.Node) (bool, error)

func (*MangerImp) ProcessingEipType

func (m *MangerImp) ProcessingEipType() string

ProcessingEipType return eip type that this controller processing, default is AnycastEIP

func (*MangerImp) ReleaseAnycastIp

func (m *MangerImp) ReleaseAnycastIp(anycastIpId string) error

Jump to

Keyboard shortcuts

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