bcc

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: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENIAttachTimeout        int = 50
	ENIAttachMaxRetry       int = 10
	ENIReadyTimeToAttach        = 5 * time.Second
	CreateENIMaxConcurrency     = 15
)
View Source
const (
	StsPodAnnotationEnableFixIP       = "cce.io/sts-enable-fix-ip"
	EnableFixIPTrue                   = "True"
	StsPodAnnotationFixIPDeletePolicy = "cce.io/sts-pod-fix-ip-delete-policy"
	FixIPDeletePolicyNever            = "Never"
)

Variables

This section is empty.

Functions

func IsFixIPStatefulSetPod added in v1.6.12

func IsFixIPStatefulSetPod(pod *corev1.Pod) bool

func NewIPAM

func NewIPAM(
	kubeClient kubernetes.Interface,
	crdClient versioned.Interface,
	kubeInformer informers.SharedInformerFactory,
	crdInformer crdinformers.SharedInformerFactory,
	bceClient cloud.Interface,
	cniMode types.ContainerNetworkMode,
	vpcID string,
	clusterID string,
	subnetSelectionPolicy SubnetSelectionPolicy,
	ipMutatingRate float64,
	ipMutatingBurst int64,
	idleIPPoolMinSize int,
	idleIPPoolMaxSize int,
	batchAddIPNum int,
	eniSyncPeriod time.Duration,
	gcPeriod time.Duration,
	_ bool,
) (ipamgeneric.Interface, error)

Types

type IPAM

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

func (*IPAM) Allocate

func (ipam *IPAM) Allocate(ctx context.Context, name, namespace, containerID string) (*v1alpha1.WorkloadEndpoint, error)

func (*IPAM) FilterIP added in v1.6.12

func (ipam *IPAM) FilterIP(ip net.IP) bool

FilterIP return true if ip was not used

func (*IPAM) Ready

func (ipam *IPAM) Ready(_ context.Context) bool

func (*IPAM) Release

func (ipam *IPAM) Release(ctx context.Context, name, namespace, containerID string) (*v1alpha1.WorkloadEndpoint, error)

func (*IPAM) Run

func (ipam *IPAM) Run(ctx context.Context, stopCh <-chan struct{}) error

type SubnetSelectionPolicy

type SubnetSelectionPolicy string
const (
	SubnetSelectionPolicyLeastENI   SubnetSelectionPolicy = "LeastENI"
	SubnetSelectionPolicyMostFreeIP SubnetSelectionPolicy = "MostFreeIP"
)

Jump to

Keyboard shortcuts

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