manifest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixupPatcher

func FixupPatcher(obj Object, gvk *schema.GroupVersionKind)

FixupPatcher fixes common issues with YAML files that are usually remediated by `kubectl apply` automatically.

Types

type Object added in v0.3.0

type Object interface {
	metav1.Object
	runtime.Object
}

func Parse

func Parse(scheme *runtime.Scheme, r io.Reader, patchers ...PatcherFunc) ([]Object, error)

Parse reads a stream of YAML documents from the given reader and parses them into Kubernetes objects according to the given runtime scheme.

For each object loaded, the specified list of patchers is run. FixupPatcher is automatically run and does not need to be present in the list of patchers.

type PatcherFunc

type PatcherFunc func(obj Object, gvk *schema.GroupVersionKind)

PatcherFunc is the type of an object patcher than can be applied by Parse.

func DefaultNamespacePatcher

func DefaultNamespacePatcher(mapper meta.RESTMapper, namespace string) PatcherFunc

DefaultNamespacePatcher sets the namespace metadata field of namespace-scoped objects to the given namespace name if the field is not specified.

Jump to

Keyboard shortcuts

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