util

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MissingKeyError templateOption = "missingkey=error"
	MissingKeyZero  templateOption = "missingkey=zero"
)

Variables

This section is empty.

Functions

func CleanupNamespaces added in v1.9.1

func CleanupNamespaces(ctx context.Context, clientSet kubernetes.Interface, labelSelector string)

CleanupNamespaces deletes namespaces with the given selector

func CleanupNonNamespacedResources added in v1.9.1

func CleanupNonNamespacedResources(ctx context.Context, clientSet kubernetes.Interface, dynamicClient dynamic.Interface, labelSelector string)

Cleanup non-namespaced resources with the given selector

func ClusterHealthCheck added in v1.9.3

func ClusterHealthCheck(clientSet kubernetes.Interface)

func ClusterHealthyVanillaK8s added in v1.9.3

func ClusterHealthyVanillaK8s(clientset kubernetes.Interface) bool

func ConfigureLogging added in v1.9.0

func ConfigureLogging(cmd *cobra.Command)

Configures kube-burner's logging level

func CreateFile

func CreateFile(fileName string, fileContent []byte) error

CreateFile creates a new file and writes content into it

func CreateNamespace added in v1.9.1

func CreateNamespace(clientSet kubernetes.Interface, name string, nsLabels map[string]string, nsAnnotations map[string]string) error

func DeleteNonNamespacedResources added in v1.9.1

func DeleteNonNamespacedResources(ctx context.Context, resources *unstructured.UnstructuredList, resourceInterface dynamic.NamespaceableResourceInterface)

func EnvToMap

func EnvToMap() map[string]interface{}

EnvToMap returns the host environment variables as a map

func ReadConfig

func ReadConfig(configFile string) (io.Reader, error)

ReadConfig reads configuration from the given path or URL

func ReadEmbedConfig

func ReadEmbedConfig(embedFs embed.FS, configFile string) (io.Reader, error)

ReadEmbedConfig reads configuration files from the given embed filesystem

func ReadUserMetadata

func ReadUserMetadata(inputFile string) (map[string]interface{}, error)

func RenderTemplate

func RenderTemplate(original []byte, inputData interface{}, options templateOption) ([]byte, error)

RenderTemplate renders a go-template

func RetryWithExponentialBackOff added in v1.9.1

func RetryWithExponentialBackOff(fn wait.ConditionFunc, duration time.Duration, factor, jitter float64, timeout time.Duration) error

RetryWithExponentialBackOff a utility for retrying the given function with exponential backoff.

func SetupCmd added in v1.9.0

func SetupCmd(cmd *cobra.Command)

Bootstraps kube-burner cmd with some common flags

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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