common

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 29 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

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 BatchCreateIppoolWithSpecifiedIPNumber added in v0.0.5

func BatchCreateIppoolWithSpecifiedIPNumber(frame *frame.Framework, ippoolNumber, ipNum int, isV4orv6Pool bool) (ipPoolNameList []string, err error)

func BatchDeletePoolUntilFinish added in v0.0.5

func BatchDeletePoolUntilFinish(f *frame.Framework, iPPoolNameList []string, ctx context.Context) error

func CheckIppoolForUsedIP added in v0.0.4

func CheckIppoolForUsedIP(f *frame.Framework, ippool *spiderpool.SpiderIPPool, 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 CreateDeployUntilExpectedReplicas added in v0.0.5

func CreateDeployUntilExpectedReplicas(frame *e2e.Framework, deploy *appsv1.Deployment, ctx context.Context) (pods *corev1.PodList, err error)

func CreateIppool added in v0.0.4

func CreateIppool(f *frame.Framework, ippool *spiderpool.SpiderIPPool, 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 CreateReservedIP added in v0.0.5

func CreateReservedIP(f *frame.Framework, ReservedIP *spiderpool.SpiderReservedIP, opts ...client.CreateOption) error

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 DeleteReservedIPByName added in v0.0.5

func DeleteReservedIPByName(f *frame.Framework, reservedIPName string, opts ...client.DeleteOption) error

func DeleteResverdIPUntilFinish added in v0.0.5

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

func ExecCommand added in v0.0.5

func ExecCommand(cmd *exec.Cmd, timeOut time.Duration) (stdout string, exitCode int)

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.SpiderIPPool)

func GenerateExampleIpv6poolObject added in v0.0.4

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

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 GenerateExampleV4ReservedIpObject added in v0.0.5

func GenerateExampleV4ReservedIpObject(ips []string) (string, *spiderpool.SpiderReservedIP)

func GenerateExampleV6ReservedIpObject added in v0.0.5

func GenerateExampleV6ReservedIpObject(ips []string) (string, *spiderpool.SpiderReservedIP)

func GenerateRandomNumber added in v0.0.4

func GenerateRandomNumber(max int) string

func GenerateString

func GenerateString(lenNum int, isHex bool) 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.SpiderIPPoolList

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.SpiderIPPool

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 GetReservedIPByName added in v0.0.5

func GetReservedIPByName(f *frame.Framework, reservedIPName string) *spiderpool.SpiderReservedIP

func GetWorkloadByName added in v0.0.4

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

func RestartNodeUntilReady added in v0.0.5

func RestartNodeUntilReady(frame *e2e.Framework, nodeMap map[string]bool, timeOut time.Duration, ctx context.Context) (bool, error)

func ScaleDeployUntilExpectedReplicas added in v0.0.5

func ScaleDeployUntilExpectedReplicas(frame *e2e.Framework, deploy *appsv1.Deployment, expectedReplicas int, ctx context.Context) (addedPod, removedPod []corev1.Pod, err error)

func UpdateIppool added in v0.0.5

func UpdateIppool(f *frame.Framework, ippool *spiderpool.SpiderIPPool, opts ...client.UpdateOption) error

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