common

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MULTUS_DEFAULT = iota
	MULTUS_MACVLAN_STANDALONE
	MULTUS_MACVLAN_OVERLAY
)

multus crd type

Variables

View Source
var (
	MacvlanStandaloneVlan0Name   = "macvlan-standalone-vlan0"
	MacvlanStandaloneVlan100Name = "macvlan-standalone-vlan100"
	MacvlanOverlayVlan0Name      = "macvlan-overlay-vlan0"
	MacvlanOverlayVlan100Name    = "macvlan-overlay-vlan100"
)

multus crd name

View Source
var (
	MultusDefaultAnnotationKey     = "v1.multus-cni.io/default-network"
	MultusAddonAnnotation_Key      = "k8s.v1.cni.cncf.io/networks"
	SpiderPoolIPPoolAnnotationKey  = "ipam.spidernet.io/ippool"
	SpiderPoolIPPoolsAnnotationKey = "ipam.spidernet.io/ippools"
	SpiderPoolIPAnnotationsKey     = []string{
		"ipam.spidernet.io/assigned-net1",
		"ipam.spidernet.io/assigned-net2",
		"ipam.spidernet.io/assigned-eth0",
	}
)

annotations

View Source
var (
	KindNodeDefaultInterface   = "eth0"
	CtxTimeout                 = 60 * time.Second
	ENV_VLAN_GATEWAY_CONTAINER = "VLAN_GATEWAY_CONTAINER"
)
View Source
var (
	IPV4       = true
	IPV6       = true
	TestMultus = true
)
View Source
var (
	MultusNs                = "kube-system"
	SpiderDoctorAgentNs     = "kube-system"
	SpiderDoctorAgentDSName = "spiderdoctor-agent"
)

Functions

func GenerateDeploymentYaml

func GenerateDeploymentYaml(dpmName, namespace string, labels, annotations map[string]string) *appsv1.Deployment

func GenerateServiceYaml

func GenerateServiceYaml(name, namespace string, port int32, labels map[string]string) *corev1.Service

func GetAllIPsFromPods

func GetAllIPsFromPods(pods *corev1.PodList) ([]string, error)

func GetCurlCommandByIPFamily

func GetCurlCommandByIPFamily(netIp string, port int32) string

func GetKindNodeIPs

func GetKindNodeIPs(ctx context.Context, f *e2e.Framework, nodeList []string) ([]string, error)

func GetPingCommandByIPFamily

func GetPingCommandByIPFamily(netIp string) string

func GetServiceNodePorts

func GetServiceNodePorts(ports []corev1.ServicePort) []int32

func WaitEndpointReady

func WaitEndpointReady(retryTimes int, name, namespace string, frame *framework.Framework) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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