common

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Overview

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Copyright 2022 Authors of spidernet-io SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

View Source
var CNIFailedToSetUpNetwork = "failed to setup network for sandbox"
View Source
var DaemonSetNameString = "daemonSet"
View Source
var DeploymentNameString = "deployment"
View Source
var GetIpamAllocationFailed = "get ipam allocation failed"
View Source
var PodEventKind = "Pod"
View Source
var ReplicaSetNameString = "replicaSet"
View Source
var SpiderPoolConfigmapName = "spiderpool-conf"
View Source
var SpiderPoolConfigmapNameSpace = "kube-system"
View Source
var StatefulSetNameString = "statefulSet"

Functions

func CheckIppoolForUsedIP added in v0.0.4

func CheckIppoolForUsedIP(f *frame.Framework, ippool *spiderpool.IPPool, PodName, PodNamespace string, ipAddrress *corev1.PodIP) (bool, error)

func CheckPodIpRecordInIppool added in v0.0.4

func CheckPodIpRecordInIppool(f *frame.Framework, v4IppoolNameList, v6IppoolNameList []string, podList *corev1.PodList) (allIPRecorded, noneIPRecorded, partialIPRecorded bool, err error)

func CheckPodListInclude added in v0.0.4

func CheckPodListInclude(list *corev1.PodList, pod *corev1.Pod) bool

func CreateIppool added in v0.0.4

func CreateIppool(f *frame.Framework, ippool *spiderpool.IPPool, opts ...client.CreateOption) error

func CreatePodUntilReady

func CreatePodUntilReady(frame *e2e.Framework, podYaml *corev1.Pod, podName, namespace string, waitPodStartTimeout time.Duration) (pod *corev1.Pod, podIPv4, podIPv6 string)

func DeleteIPPoolByName added in v0.0.4

func DeleteIPPoolByName(f *frame.Framework, poolName string, opts ...client.DeleteOption) error

func DeleteIPPoolUntilFinish added in v0.0.4

func DeleteIPPoolUntilFinish(f *frame.Framework, poolName string, ctx context.Context, opts ...client.DeleteOption) error

func ExecCommandOnKindNode added in v0.0.4

func ExecCommandOnKindNode(nodeNameList []string, command string, timeOut time.Duration)

func GenerateExampleDaemonSetYaml

func GenerateExampleDaemonSetYaml(dsName, namespace string) *appsv1.DaemonSet

func GenerateExampleDeploymentYaml

func GenerateExampleDeploymentYaml(dpmName, namespace string, replica int32) *appsv1.Deployment

func GenerateExampleIpv4poolObject added in v0.0.4

func GenerateExampleIpv4poolObject(ipNum int) (string, *spiderpool.IPPool)

func GenerateExampleIpv6poolObject added in v0.0.4

func GenerateExampleIpv6poolObject(ipNum int) (string, *spiderpool.IPPool)

func GenerateExampleJobYaml added in v0.0.4

func GenerateExampleJobYaml(behavior JobBehave, jdName, namespace string, parallelism *int32) *batchv1.Job

func GenerateExamplePodYaml

func GenerateExamplePodYaml(podName, namespace string) *corev1.Pod

func GenerateExampleReplicaSetYaml

func GenerateExampleReplicaSetYaml(rsName, namespace string, replica int32) *appsv1.ReplicaSet

func GenerateExampleStatefulSetYaml

func GenerateExampleStatefulSetYaml(stsName, namespace string, replica int32) *appsv1.StatefulSet

func GenerateRandomNumber added in v0.0.4

func GenerateRandomNumber(max int) string

func GenerateString

func GenerateString(lenNum int) string

func GetAdditionalPods added in v0.0.4

func GetAdditionalPods(previous, latter *corev1.PodList) (pods []corev1.Pod)

func GetAllIppool added in v0.0.4

func GetAllIppool(f *frame.Framework, opts ...client.ListOption) *spiderpool.IPPoolList

func GetClusterDefaultIppool added in v0.0.4

func GetClusterDefaultIppool(f *frame.Framework) (v4IppoolList, v6IppoolList []string, e error)

func GetIppoolByName added in v0.0.4

func GetIppoolByName(f *frame.Framework, poolName string) *spiderpool.IPPool

func GetNamespaceDefaultIppool added in v0.0.4

func GetNamespaceDefaultIppool(f *frame.Framework, namespace string) (v4IppoolList, v6IppoolList []string, e error)

func GetPodIPv4Address added in v0.0.4

func GetPodIPv4Address(pod *corev1.Pod) *corev1.PodIP

func GetPodIPv6Address added in v0.0.4

func GetPodIPv6Address(pod *corev1.Pod) *corev1.PodIP

func GetWorkloadByName added in v0.0.4

func GetWorkloadByName(f *frame.Framework, namespace, name string) *spiderpool.WorkloadEndpoint

func WaitIPReclaimedFinish added in v0.0.4

func WaitIPReclaimedFinish(f *frame.Framework, v4IppoolNameList, v6IppoolNameList []string, podList *corev1.PodList, timeOut time.Duration) error

Types

type JobBehave added in v0.0.4

type JobBehave string
const (
	JobTypeRunningForever JobBehave = "runningForeverJob"
	JobTypeFail           JobBehave = "failedJob"
	JobTypeFinish         JobBehave = "succeedJob"
)

Jump to

Keyboard shortcuts

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