source

package
v1.0.81 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChartNames added in v1.0.77

func ChartNames(charts ...Chart) []string

Types

type Chart

type Chart interface {
	// Name returns the name of this chart
	Name() string
	// Path returns the path to this chart on disk
	Path() string
	// BumpChartVersion updates chart version in chart.yaml
	BumpChartVersion(latestPublishedVersion string) (string, error)
	// UpdateDependencies runs `helm dependency update` on the local copy of the chart.
	UpdateDependencies() error
	// PackageChart runs `helm package` to package a chart
	PackageChart(destPath string) error
	// GenerateDocs re-generates README documentation for the given chart
	GenerateDocs() error
	// LocalDependencies returns the names of local dependencies / subcharts (using Helm's "file://" repo support)
	LocalDependencies() []string
	// SetDependencyVersion sets the version of a dependency in this chart's Chart.yaml
	SetDependencyVersion(dependencyName string, newVersion string) error
	// ManifestVersion returns the version of this chart in Chart.yaml
	ManifestVersion() string
}

Chart represents a Helm chart source directory on the local filesystem.

func NewChart

func NewChart(chartSourceDir string, shellRunner shell.Runner) (Chart, error)

NewChart constructs a Chart

type ChartManifest

type ChartManifest struct {
	Name         string
	Version      string
	Dependencies []struct {
		Name       string
		Repository string
		Version    string
	}
}

ChartManifest struct used to unmarshal Helm chart.yaml files.

type ChartsDir

type ChartsDir interface {
	// Exists returns true if a chart by the given name exists in the directory
	Exists(name string) bool
	// GetChart returns a Chart for the chart with the given name, or an error if no chart by that name exists in source dir
	GetChart(name string) (Chart, error)
	// GetCharts returns the Chart objects for a set of charts with the given name(s), or an error if no chart(s) by that name exists in source dir
	GetCharts(name ...string) ([]Chart, error)
	// UpdateDependentVersionConstraints go through all dependents and update version constraints to match new version
	UpdateDependentVersionConstraints(chart Chart, newVersion string) error
	// WithTransitiveDependents returns the given charts plus all of their transitive dependents
	WithTransitiveDependents(chart []Chart) ([]Chart, error)
	// RecursivelyUpdateDependencies given a list of charts:
	// * identify all transitive dependencies of those charts
	// * sort the list of charts + dependencies in topological order
	// * run `helm dependency update` on each chart in the list
	RecursivelyUpdateDependencies(chart ...Chart) error
}

ChartsDir represents a directory of Helm chart sources on the local filesystem.

func NewChartsDir

func NewChartsDir(
	sourceDir string,
	shellRunner shell.Runner,
) (ChartsDir, error)

NewChartsDir constructs a new ChartsDir

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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