common

package
v1.1.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchOnePodNetworking

func MatchOnePodNetworking(pod *corev1.Pod, ns *corev1.Namespace, networkings []v1beta1.PodNetworking) (*v1beta1.PodNetworking, error)

MatchOnePodNetworking will range all podNetworking and try to found a matched podNetworking for this pod for stateless pod Fixed ip config is never matched

func PodMatchSelector

func PodMatchSelector(labelSelector *metav1.LabelSelector, l labels.Set) (bool, error)

PodMatchSelector pod is selected by selector

func SetPodENIStatus

func SetPodENIStatus(ctx context.Context, c client.Client, update, old *v1beta1.PodENI) (*v1beta1.PodENI, error)

SetPodENIStatus set cr status

Types

type PodConf

type PodConf struct {
	SecurityGroups []string
	VSwitchID      string
	UseFixedIP     bool

	IPAllocType         v1beta1.IPAllocType
	FixedIPReleaseAfter time.Duration
	ReleaseStrategy     v1beta1.ReleaseStrategy

	// from node
	InstanceID string
	Zone       string
	TrunkENIID string
}

PodConf is the type describe the eni config for this pod

func (*PodConf) SetNodeConf

func (p *PodConf) SetNodeConf(node *corev1.Node) error

SetNodeConf parse from node

func (*PodConf) SetPodENIConf

func (p *PodConf) SetPodENIConf(podENI *v1beta1.PodENI) error

SetPodENIConf parse from podENI

func (*PodConf) SetPodNetworkingConf

func (p *PodConf) SetPodNetworkingConf(podNetworking *v1beta1.PodNetworking) error

SetPodNetworkingConf set config from podNetworking

Jump to

Keyboard shortcuts

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