k8s

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServiceHandler = "/api/v1/namespaces/default/services"
)

Functions

func CallSysCommand

func CallSysCommand(command string) (string, error)

func CleanBusyBoxTool

func CleanBusyBoxTool(name string, ctx *utils.TestContext) error

func CleanupApplication

func CleanupApplication(name string, ctx *utils.TestContext) error

func CreateBusyboxTool

func CreateBusyboxTool(name string, labels, nodeSelector map[string]string, ctx *utils.TestContext) (*v1.Pod, error)

func CreateHostnameApplication

func CreateHostnameApplication(config *ApplicationConfig) error

func CreateTCPReplyEdgemeshApplication

func CreateTCPReplyEdgemeshApplication(config *ApplicationConfig) error

func FetchHostnameAndStatusCodeFromOutput

func FetchHostnameAndStatusCodeFromOutput(outStr string) (hostname string, statusCode int)

func FetchIPFromDigOutput

func FetchIPFromDigOutput(outStr string) string

func FetchTCPReplyFromOutput

func FetchTCPReplyFromOutput(outStr string) string

func GenDeploymentNameFromUID

func GenDeploymentNameFromUID(uid string) string

func GenServiceNameFromUID

func GenServiceNameFromUID(uid string) string

func GetPodByLabels

func GetPodByLabels(labels map[string]string, ctx *utils.TestContext) (v1.PodList, error)

func GetService

func GetService(name string, ctx *utils.TestContext) (*v1.Service, error)

func WaitforPodsRunning added in v1.9.0

func WaitforPodsRunning(kubeConfigPath string, podlist v1.PodList, timout time.Duration) error

WaitforPodsRunning waits util all pods are in running status or timeout code copy and add timeout check from https://github.com/kubeedge/kubeedge/blob/master/tests/e2e/utils/pod.go#L196

Types

type ApplicationConfig

type ApplicationConfig struct {
	Name              string
	ImageURL          string
	NodeSelector      map[string]string
	Labels            map[string]string
	Replica           int
	ContainerPort     int32
	ServicePortName   string
	ServicePort       int32
	ServiceProtocol   v1.Protocol
	ServiceTargetPort intstr.IntOrString
	Ctx               *utils.TestContext
}

Jump to

Keyboard shortcuts

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