helm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartVersion

type ChartVersion struct {
	Version     string   `yaml:"version"`
	URLs        []string `yaml:"urls"`
	AppVersion  string   `yaml:"appVersion,omitempty"`
	Created     string   `yaml:"created,omitempty"`
	Description string   `yaml:"description,omitempty"`
}

ChartVersion represents a version entry from a Helm repo index.

type ConflictEntry

type ConflictEntry struct {
	Path            string `json:"path"`
	ConfiguredValue string `json:"configured_value"`
	OldDefault      string `json:"old_default"`
	NewDefault      string `json:"new_default"`
	Source          string `json:"source"` // "global" or cluster name
}

ConflictEntry represents a conflict between a configured value and a changed default.

func FindConflicts

func FindConflicts(configYAML, oldDefaultYAML, newDefaultYAML string) ([]ConflictEntry, error)

FindConflicts checks if any configured values conflict with changes between old and new defaults.

type DiffType

type DiffType string

DiffType represents the type of value change between versions.

const (
	DiffAdded   DiffType = "added"
	DiffRemoved DiffType = "removed"
	DiffChanged DiffType = "changed"
)

type Fetcher

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

Fetcher downloads Helm chart values.yaml for comparison. Includes in-memory caching to avoid redundant downloads.

func NewFetcher

func NewFetcher() *Fetcher

NewFetcher creates a new Helm chart fetcher with caching.

func (*Fetcher) FetchReleaseNotes

func (f *Fetcher) FetchReleaseNotes(ctx context.Context, repoURL, chartName, version string) (string, error)

FetchReleaseNotes tries to get release notes for a chart version. It attempts GitHub Releases API first, then falls back to chart metadata.

func (*Fetcher) FetchValues

func (f *Fetcher) FetchValues(ctx context.Context, repoURL, chartName, version string) (string, error)

FetchValues downloads a chart archive and extracts values.yaml.

func (*Fetcher) ListVersions

func (f *Fetcher) ListVersions(ctx context.Context, repoURL, chartName string) ([]ChartVersion, error)

ListVersions returns available versions for a chart from the repo index.

type UpgradeAnalysis

type UpgradeAnalysis struct {
	AddonName      string          `json:"addon_name"`
	CurrentVersion string          `json:"current_version"`
	TargetVersion  string          `json:"target_version"`
	TotalChanges   int             `json:"total_changes"`
	Added          []ValueDiff     `json:"added"`
	Removed        []ValueDiff     `json:"removed"`
	Changed        []ValueDiff     `json:"changed"`
	Conflicts      []ConflictEntry `json:"conflicts"`
}

UpgradeAnalysis holds the full upgrade impact analysis results.

type ValueDiff

type ValueDiff struct {
	Path     string   `json:"path"`
	Type     DiffType `json:"type"`
	OldValue string   `json:"old_value,omitempty"`
	NewValue string   `json:"new_value,omitempty"`
}

ValueDiff represents a single difference in values.yaml between two chart versions.

func DiffValues

func DiffValues(oldYAML, newYAML string) (added, removed, changed []ValueDiff, err error)

DiffValues compares two YAML strings and returns the differences.

Jump to

Keyboard shortcuts

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