k8sclient

package
v0.14.0-experiment-98d0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateObjectShouldSucceed

func CreateObjectShouldSucceed(c client.Client, obj client.Object)

CreateObjectShouldSucceed creates the given object and ensures it succeeds

func DeleteObjectShouldSucceed

func DeleteObjectShouldSucceed(c client.Client, obj client.Object)

DeleteObjectShouldSucceed deletes the given object and ensures it succeeds

func GetObjectShouldSucceed

func GetObjectShouldSucceed(c client.Client, name, namespace string, obj client.Object)

GetObjectShouldSucceed gets the object identified by name and namespace and ensures it succeeds

func GetPodEnvVariable

func GetPodEnvVariable(c client.Client, envVarName string, labelSelector client.MatchingLabels) (string, string, error)

GetPodEnvVariable returns the value of the given env variable in the first container of the first pod that matches the given labelSelector. Returns the pod name, the value of the env variable and error (if any). Returns a NotFound error in case of not finding any matching pod or if the first pod has no containers. Returns the value of the env variable or "unset" if it was not found in the container.

func ObjectShouldNotExist

func ObjectShouldNotExist(c client.Client, name, namespace string, obj client.Object, checkConsistently bool)

ObjectShouldNotExist checks the object identified with name and namespace does not exist. If checkConsistently is set to true it checks consistently for 5 seconds, otherwise it runs a single check

func UpdateObjectShouldSucceed

func UpdateObjectShouldSucceed(c client.Client, obj client.Object)

UpdateObjectShouldSucceed updates the given object and ensures it succeeds

Types

This section is empty.

Jump to

Keyboard shortcuts

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