Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶
type Manifest struct { // OriginalFilename is set to the filename this manifest was loaded from. // It is not guaranteed to be set or be unique, but we will set it when // loading from disk to provide better debuggability. OriginalFilename string Raw []byte GVK schema.GroupVersionKind Obj *unstructured.Unstructured }
Manifest stores Kubernetes object in Raw from a file. It stores the GroupVersionKind for the manifest. Raw and Obj should always be kept in sync such that each provides the same data but in different formats. To ensure Raw and Obj are always in sync, they should not be set directly but rather only be set by calling either method ManifestsFromFiles or ParseManifests.
func ManifestsFromFiles ¶
ManifestsFromFiles reads files and returns Manifests in the same order. files should be list of absolute paths for the manifests on disk.
func ParseManifests ¶
ParseManifests parses a YAML or JSON document that may contain one or more kubernetes resources.
func (*Manifest) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for the Manifest type. It unmarshals bytes of a single kubernetes object to Manifest.