Documentation
¶
Index ¶
- Constants
- func Manifests(oldIndex, newIndex map[string]*manifest.MappingResult, options *Options, ...) bool
- func ManifestsOwnership(oldIndex, newIndex map[string]*manifest.MappingResult, ...) bool
- func Releases(oldIndex, newIndex map[string]*manifest.MappingResult, options *Options, ...) bool
- type ChangeStyle
- type FieldChange
- type Options
- type OwnershipDiff
- type Report
- type ReportEntry
- type ReportFormat
- type ReportTemplateSpec
- type ResourceStatus
- type StructuredEntry
Constants ¶
const ( // DiffToolEnvVar holds the diff tool command line when no flag is given. // Setting it is by itself a request to render the diff with that command. DiffToolEnvVar = "HELM_DIFF_TOOL" )
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
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
DiffToolCommand string
// contains filtered or unexported fields
}
Options are all the options to be passed to generate a diff
func (*Options) DiffTool ¶ added in v3.15.12
DiffTool reports whether the diff is rendered by an external tool, requested either with --diff-tool or through the HELM_DIFF_TOOL environment variable. The external tool overrides the built-in outputs, except that an explicit flag supersedes the environment variable (see IgnoreDiffToolEnvVar).
func (*Options) IgnoreDiffToolEnvVar ¶ added in v3.15.12
func (o *Options) IgnoreDiffToolEnvVar()
IgnoreDiffToolEnvVar stops the HELM_DIFF_TOOL environment variable from being consulted. It implements the "explicit flag over environment" precedence: a command requested with --diff-tool is authoritative even when empty, and an explicitly requested built-in output must not be silently overridden by a variable inherited e.g. from a shell profile.
func (*Options) StructuredOutput ¶ added in v3.15.0
StructuredOutput returns true when the structured JSON output is requested except when using a diff tool, whose input is the line diffs that structured output skips.
type OwnershipDiff ¶ added in v3.11.0
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
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
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.