diff

package
v3.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 26 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifests

func Manifests(oldIndex, newIndex map[string]*manifest.MappingResult, options *Options, to io.Writer) bool

Manifests diff on manifests

func ManifestsOwnership added in v3.11.0

func ManifestsOwnership(oldIndex, newIndex map[string]*manifest.MappingResult, newOwnedReleases map[string]OwnershipDiff, options *Options, to io.Writer) bool

func Releases

func Releases(oldIndex, newIndex map[string]*manifest.MappingResult, options *Options, to io.Writer) bool

Releases reindex the content based on the template names and pass it to Manifests

Types

type ChangeStyle

type ChangeStyle struct {
	// contains filtered or unexported fields
}

ChangeStyle for styling the report

type FieldChange added in v3.15.0

type FieldChange struct {
	Path     string      `json:"path,omitempty"`
	Field    string      `json:"field,omitempty"`
	Change   string      `json:"change"`
	OldValue interface{} `json:"oldValue,omitempty"`
	NewValue interface{} `json:"newValue,omitempty"`
}

FieldChange stores a JSON-Pointer path and the change that occurred.

type Options added in v3.4.0

type Options struct {
	OutputFormat              string
	OutputContext             int
	StripTrailingCR           bool
	ShowSecrets               bool
	ShowSecretsDecoded        bool
	SuppressedKinds           []string
	FindRenames               float32
	SuppressedOutputLineRegex []string
}

Options are all the options to be passed to generate a diff

func (*Options) StructuredOutput added in v3.15.0

func (o *Options) StructuredOutput() bool

StructuredOutput returns true when the structured JSON output is requested.

type OwnershipDiff added in v3.11.0

type OwnershipDiff struct {
	OldRelease string
	NewRelease string
}

type Report

type Report struct {
	Entries []ReportEntry
	// contains filtered or unexported fields
}

Report to store report data and format

func ManifestReport added in v3.13.1

func ManifestReport(oldIndex, newIndex map[string]*manifest.MappingResult, options *Options) (*Report, error)

type ReportEntry

type ReportEntry struct {
	Key             string
	SuppressedKinds []string
	Kind            string
	Context         int
	Diffs           []difflib.DiffRecord
	ChangeType      string
	Structured      *StructuredEntry
}

ReportEntry to store changes between releases

type ReportFormat

type ReportFormat struct {
	// contains filtered or unexported fields
}

ReportFormat to the context to make a changes report

type ReportTemplateSpec

type ReportTemplateSpec struct {
	Namespace string
	Name      string
	Kind      string
	API       string
	Change    string
}

ReportTemplateSpec for common template spec

type ResourceStatus added in v3.15.0

type ResourceStatus struct {
	OldExists bool `json:"oldExists"`
	NewExists bool `json:"newExists"`
}

ResourceStatus indicates whether manifests existed before or after the diff.

type StructuredEntry added in v3.15.0

type StructuredEntry struct {
	APIVersion        string         `json:"apiVersion,omitempty"`
	Kind              string         `json:"kind,omitempty"`
	Namespace         string         `json:"namespace,omitempty"`
	Name              string         `json:"name,omitempty"`
	ChangeType        string         `json:"changeType,omitempty"`
	ResourceStatus    ResourceStatus `json:"resourceStatus"`
	Changes           []FieldChange  `json:"changes,omitempty"`
	ChangesSuppressed bool           `json:"changesSuppressed,omitempty"`
}

StructuredEntry captures machine-readable diff information for a resource.

Jump to

Keyboard shortcuts

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