util

package
v0.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package util contains all the utility methods to execute the test (APIServer interaction, wait for condition, etc.).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArePodsUp

func ArePodsUp(ctx context.Context, clientset kubernetes.Interface, namespace string) (ready, notReady []string, retErr error)

ArePodsUp check if all the pods of a specific namespace are ready. It returns a list of ready pods, a list of unready pods and occurred errors.

func CheckVirtualNodes

func CheckVirtualNodes(ctx context.Context, homeClusterClient kubernetes.Interface) (ready bool)

CheckVirtualNodes checks if the Liqo virtual nodes of cluster C.

func DeleteNamespace

func DeleteNamespace(ctx context.Context, client kubernetes.Interface, labelSelector map[string]string) error

DeleteNamespace wrap the deletion of a namespace.

func EnforceNamespace

func EnforceNamespace(ctx context.Context, client kubernetes.Interface, clusterID, name string) (*v1.Namespace, error)

EnforceNamespace creates and returns a namespace. If it already exists, it just returns the namespace.

func ExecCmd

func ExecCmd(config *rest.Config, client kubernetes.Interface, podName, namespace, command string) (stdOut, stdErr string, retErr error)

ExecCmd executes a command inside a pod.

func GetNodes

func GetNodes(ctx context.Context, client kubernetes.Interface, clusterID, labelSelector string) (*v1.NodeList, error)

GetNodes returns the list of nodes of the cluster matching the given labels.

func IsPodUp

func IsPodUp(ctx context.Context, client kubernetes.Interface, namespace, podName string, isHomePod bool) bool

IsPodUp waits for a specific namespace/podName to be ready. It returns true if the pod within the timeout, false otherwise.

func TriggerCheckNodeConnectivity

func TriggerCheckNodeConnectivity(localNodes *v1.NodeList, command string, nodePortValue int) error

TriggerCheckNodeConnectivity checks nodePort service connectivity, executing a command for every node in the target cluster.

Types

This section is empty.

Jump to

Keyboard shortcuts

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