utils

package
v0.0.0-...-bf278f2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUnstructured

func BytesToUnstructured(b []byte) ([]*unstructured.Unstructured, error)

BytesToUnstructured converts a slice of Bytes to Unstructured objects. This function is useful when you want to read a yaml manifest and covert it to Kubernetes objects.

func EnsureNamespace

func EnsureNamespace(ctx context.Context, client client.Client, namespace string) error

EnsureNamespace ensures the namespace exists in the cluster by creating it if it does not exist.

func UnstructuredToBytes

func UnstructuredToBytes(objs []*unstructured.Unstructured) ([]byte, error)

UnstructuredToBytes converts a list of Unstructured objects to YAML.

Types

This section is empty.

Jump to

Keyboard shortcuts

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