eni

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENIStatusInuse     string = "inuse"
	ENIStatusAvailable string = "available"
	ENIStatusAttaching string = "attaching"
	ENIStatusDetaching string = "detaching"
	ENIStatusDeleting  string = "deleting"
)
View Source
const (
	NodeAnnotationMaxENINum         = "cce.io/max-eni-num"
	NodeAnnotationMaxIPPerENI       = "cce.io/max-ip-per-eni"
	NodeAnnotationPreAttachedENINum = "cce.io/pre-attached-eni-num"
	NodeAnnotationWarmIPTarget      = "cce.io/warm-ip-target"
)

Variables

This section is empty.

Functions

func CreateNameForENI

func CreateNameForENI(clusterID, instanceID, nodeName string) string

CreateNameForENI creates name for newly created eni

func ENICreatedByCCE

func ENICreatedByCCE(eni *enisdk.Eni) bool

ENICreatedByCCE judges whether an eni is created by cce

func ENIOwnedByCluster

func ENIOwnedByCluster(eni *enisdk.Eni, clusterID string) bool

ENIOwnedByCluster judges whether an eni is owned by specific cluster

func ENIOwnedByNode

func ENIOwnedByNode(eni *enisdk.Eni, clusterID, instanceID string) bool

ENIOwnedByNode judges whether an eni is owned by specific node

func GetMaxENINumFromNodeAnnotations

func GetMaxENINumFromNodeAnnotations(node *v1.Node) (int, error)

func GetMaxENIPerNode

func GetMaxENIPerNode(CPUCount int) int

GetMaxENIPerNode returns the max num of ENIs that can be attached to a node

func GetMaxIPPerENI

func GetMaxIPPerENI(memoryCapacityInGB int) int

GetMaxIPPerENI returns the max num of IPs that can be attached to single ENI Ref: https://cloud.baidu.com/doc/VPC/s/0jwvytzll

func GetMaxIPPerENIFromNodeAnnotations

func GetMaxIPPerENIFromNodeAnnotations(node *v1.Node) (int, error)

func GetNodeNameFromENIName

func GetNodeNameFromENIName(eniName string) (string, error)

func GetPreAttachedENINumFromNodeAnnotations

func GetPreAttachedENINumFromNodeAnnotations(node *v1.Node) (int, error)

func GetPrivateIPSet

func GetPrivateIPSet(eni *enisdk.Eni) []v1alpha1.PrivateIP

func GetWarmIPTargetFromNodeAnnotations

func GetWarmIPTargetFromNodeAnnotations(node *v1.Node) (int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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