manifest

package
v1.223.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package manifest provides shared helpers for decoding, serializing, naming, and packaging Kubernetes manifest objects. It is producer-agnostic: rendered manifests from the Helm component, the Kubernetes component, or the Helmfile `template` path all flow through these helpers so they emit identical output and identical provision-artifact shapes for delivery targets (e.g. git).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArtifactFiles

func ArtifactFiles(objects []*unstructured.Unstructured) (map[string][]byte, error)

ArtifactFiles builds a deterministic per-object file set (name -> YAML bytes) suitable for delivery to a provision target.

func DecodeObjects

func DecodeObjects(data []byte) ([]*unstructured.Unstructured, error)

DecodeObjects decodes a multi-document YAML/JSON byte stream into a slice of unstructured objects. Embedded Kubernetes List objects are expanded into their individual items.

func MultiDocumentYAML

func MultiDocumentYAML(objects []*unstructured.Unstructured) ([]byte, error)

MultiDocumentYAML serializes objects into a single multi-document YAML stream.

func ObjectFileName

func ObjectFileName(index int, obj *unstructured.Unstructured) string

ObjectFileName returns a deterministic, filesystem-safe file name for an object, prefixed with its 1-based position so ordering is preserved.

func ObjectYAML

func ObjectYAML(obj *unstructured.Unstructured) ([]byte, error)

ObjectYAML serializes a single object to YAML.

func ValidateRenderOptions

func ValidateRenderOptions(options RenderOptions) error

ValidateRenderOptions verifies the output flag combination is valid.

func WriteObjects

func WriteObjects(objects []*unstructured.Unstructured, options RenderOptions) error

WriteObjects writes the rendered objects according to the resolved output mode. With no Output/OutputDir set, the multi-document YAML is written to stdout.

Types

type RenderOptions

type RenderOptions struct {
	// Output writes all objects to a single multi-document YAML file.
	Output string
	// OutputDir writes objects to a directory (a single manifest.yaml unless Split is set).
	OutputDir string
	// Split writes one file per object. Requires OutputDir.
	Split bool
	// Noun is the human-readable object noun used in status output (e.g. "Helm", "Kubernetes").
	Noun string
	// AtmosConfig controls TTY-aware syntax highlighting for stdout output.
	AtmosConfig *schema.AtmosConfiguration
}

RenderOptions controls how rendered manifests are written.

Jump to

Keyboard shortcuts

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