dyff

package
v0.34.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffYAML

func DiffYAML(liveFile, mergedFile string, output io.Writer) error

func InstanceDryRunDiff

func InstanceDryRunDiff(ctx context.Context,
	rm *ssa.ResourceManager,
	objects []*unstructured.Unstructured,
	staleObjects []*unstructured.Unstructured,
	nsExists bool,
	tmpDir string,
	withDiff bool,
	w io.Writer) (bool, error)

InstanceDryRunDiff performs a server-side apply dry run of the instance objects and logs the pending change of each one. When withDiff is set, the field changes of the objects that differ from the cluster state are printed to w in YAML diff format, and the dry-run failures are aggregated into the returned error. It returns true if applying the instance would change the cluster state, i.e. if any object would be created, configured or deleted. Mirroring the apply and prune semantics, existing objects annotated as one-off are skipped, and stale objects that are absent from the cluster or annotated with prune disabled are not counted as pending deletions.

Types

type DyffPrinter

type DyffPrinter struct {
	OmitHeader bool
}

DyffPrinter is a printer that prints dyff reports.

func NewDyffPrinter

func NewDyffPrinter() *DyffPrinter

NewDyffPrinter returns a new DyffPrinter.

func (*DyffPrinter) Print

func (p *DyffPrinter) Print(w io.Writer, args ...any) error

Print prints the given args to the given writer.

Jump to

Keyboard shortcuts

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