util

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0, BSD-3-Clause, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRetry = wait.Backoff{
	Steps:    50,
	Duration: 8 * time.Second,
	Factor:   1.0,
	Jitter:   0.1,
}

DefaultRetry is the default backoff for e2e tests.

View Source
var SmallRetry = wait.Backoff{
	Steps:    5,
	Duration: 8 * time.Second,
	Factor:   1.0,
	Jitter:   0.1,
}

SmallRetry holds parameters applied to a Backoff function

Functions

func CreateNamespace

func CreateNamespace(namespace string, kubeClient kubernetes.Interface) error

CreateNamespace creates a namespace with the specified name using the provided client.

func DeleteNamespace

func DeleteNamespace(namespace string, kubeClient kubernetes.Interface) error

DeleteNamespace deletes a namespace with the specified name using the provided client.

func JSONPrettyPrint

func JSONPrettyPrint(obj interface{}) string

JSONPrettyPrint - Indent the json output

func NamespaceExists

func NamespaceExists(namespace string, kubeClient kubernetes.Interface) bool

NamespaceExists determines whether a namespace with the specified name exists using the provided client.

func NewSecret

func NewSecret(secretName, namespace, username, password, chapsecret string) *corev1.Secret

NewSecret creates a basic auth secret

func Retry

func Retry(backoff wait.Backoff, fn wait.ConditionFunc) error

Retry executes the provided function repeatedly, retrying until the function returns done = true, errors, or exceeds the given timeout.

func WaitForDaemonSetAvailable

func WaitForDaemonSetAvailable(namespace string, daemonSetName string, backoff wait.Backoff, kubeClient kubernetes.Interface, log *logrus.Logger) error

WaitForDaemonSetAvailable - Waits for the given daemonset to available

func WaitForPods

func WaitForPods(namespace string, kubeClient kubernetes.Interface, driverType string, log *logrus.Logger) error

WaitForPods Waits for the given deployment to contain the given PVC

Types

This section is empty.

Jump to

Keyboard shortcuts

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