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
func Parse ¶
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.
Click to show internal directories.
Click to hide internal directories.