Documentation ¶
Index ¶
- Constants
- func CreateNameForENI(clusterID, instanceID, nodeName string) string
- func ENICreatedByCCE(eni *enisdk.Eni) bool
- func ENIOwnedByCluster(eni *enisdk.Eni, clusterID string) bool
- func ENIOwnedByNode(eni *enisdk.Eni, clusterID, instanceID string) bool
- func GetMaxENINumFromNodeAnnotations(node *v1.Node) (int, error)
- func GetMaxENIPerNode(CPUCount int) int
- func GetMaxIPPerENI(memoryCapacityInGB int) int
- func GetMaxIPPerENIFromNodeAnnotations(node *v1.Node) (int, error)
- func GetNodeNameFromENIName(eniName string) (string, error)
- func GetPreAttachedENINumFromNodeAnnotations(node *v1.Node) (int, error)
- func GetPrivateIPSet(eni *enisdk.Eni) []v1alpha1.PrivateIP
- func GetWarmIPTargetFromNodeAnnotations(node *v1.Node) (int, error)
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 ¶
CreateNameForENI creates name for newly created eni
func ENICreatedByCCE ¶
ENICreatedByCCE judges whether an eni is created by cce
func ENIOwnedByCluster ¶
ENIOwnedByCluster judges whether an eni is owned by specific cluster
func ENIOwnedByNode ¶
ENIOwnedByNode judges whether an eni is owned by specific node
func GetMaxENIPerNode ¶
GetMaxENIPerNode returns the max num of ENIs that can be attached to a node
func GetMaxIPPerENI ¶
GetMaxIPPerENI returns the max num of IPs that can be attached to single ENI Ref: https://cloud.baidu.com/doc/VPC/s/0jwvytzll
func GetNodeNameFromENIName ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.