kubemanifests

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAndConvertIntoObject

func LoadAndConvertIntoObject(scheme *runtime.Scheme, filePath string, out interface{}) error

LoadAndConvertIntoObject loads one Kubernetes object from a file into the out object. It uses the `Convert` method of `scheme` under the hood, so it does any conversion that method would do. LoadAndUnmarshalIntoObject provides similar functionality, without the conversion aspect. LoadAndUnmarshalIntoObject should only be used when there is no available scheme or when the user wants to explicitly block any conversions.

func LoadAndUnmarshalIntoObject

func LoadAndUnmarshalIntoObject(filePath string, out interface{}) error

LoadAndUnmarshalIntoObject loads one Kubernetes object from a file into the out object. LoadAndUnmarshalIntoObject provides similar functionality, but uses `runtime.Scheme.Convert` under the hood. LoadAndUnmarshalIntoObject should only be used when there is no available scheme or when the user wants to explicitly block any conversions.

func LoadKubernetesObjectsFromBytes

func LoadKubernetesObjectsFromBytes(fileYaml []byte) ([]unstructured.Unstructured, error)

Loads kubernetes objects from given bytes. A single file may contain multiple objects separated by "---\n".

func LoadKubernetesObjectsFromFile

func LoadKubernetesObjectsFromFile(filePath string) ([]unstructured.Unstructured, error)

Loads kubernetes objects from the given file.

func LoadKubernetesObjectsFromFolder

func LoadKubernetesObjectsFromFolder(folderPath string) ([]unstructured.Unstructured, error)

Loads kubernets objects from all .yaml files in the given folder. Does not recurse into subfolders. Preserves lexical file order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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