Documentation ¶
Overview ¶
unstruct has utilities for working with k8s unstructured data
Index ¶
Constants ¶
View Source
const CRD = "CustomResourceDefinition"
Variables ¶
This section is empty.
Functions ¶
func NestedMapSlice ¶
NestedMapSlice returns a copy of []map[string]any value of a nested field. Returns false if value is not found and an error if not a []any or contains non-map items in the slice. If the value is found but not of type []any, this still returns true.
func UnmarshalYamls ¶
func UnmarshalYamls(yamlFiles [][]byte) ([]unstructured.Unstructured, error)
UnmarshalYamls un-marshals the YAML documents in the given file into a slice of unstruct.Unstructureds, one for each CRD. Only returns the YAML files for Kubernetes manifests that are CRDs and ignores others. Returns an error if any document failed to unmarshal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.