utils

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KCMControllerLabel = "app.kubernetes.io/name=kcm"
)

Variables

This section is empty.

Functions

func ConvertConditionsToString

func ConvertConditionsToString(condition metav1.Condition) string

func GetNonEmptyLines

func GetNonEmptyLines(output string) []string

GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.

func GetProjectDir

func GetProjectDir() (string, error)

GetProjectDir will return the directory where the project is

func LoadImageToKindClusterWithName

func LoadImageToKindClusterWithName(name string) error

LoadImageToKindClusterWithName loads a local docker image to the kind cluster

func Run

func Run(cmd *exec.Cmd) ([]byte, error)

Run executes the provided command within this context and returns it's output. Run does not wait for the command to finish, use Wait instead.

func ValidateConditionsTrue

func ValidateConditionsTrue(unstrObj *unstructured.Unstructured) error

ValidateConditionsTrue iterates over the conditions of the given unstructured object and returns an error if any of the conditions are not true. Conditions are expected to be of type metav1.Condition.

func ValidateObjectNamePrefix

func ValidateObjectNamePrefix(unstrObj *unstructured.Unstructured, clusterName string) error

ValidateObjectNamePrefix checks if the given object name has the given prefix.

func WarnError

func WarnError(err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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