helm

package
v0.68.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Overview

Package helm contains operations for working with helm charts.

Package helm contains operations for working with helm charts.

Package helm contains operations for working with helm charts.

Package helm contains operations for working with helm charts.

Package helm contains operations for working with helm charts.

Package helm contains operations for working with helm charts.

Package helm contains operations for working with helm charts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChartFromZarfManifest added in v0.52.0

func ChartFromZarfManifest(manifest v1alpha1.ZarfManifest, manifestPath, packageName, componentName string) (v1alpha1.ZarfChart, *chart.Chart, error)

ChartFromZarfManifest generates a helm chart and config from a given Zarf manifest.

func Destroy

func Destroy(ctx context.Context, purgeAllZarfInstallations bool)

Destroy removes ZarfInitPackage charts from the cluster and optionally all Zarf-installed charts.

func DownloadChartFromGitToTemp

func DownloadChartFromGitToTemp(ctx context.Context, url string) (string, error)

DownloadChartFromGitToTemp downloads a chart from git into a temp directory

func DownloadPublishedChart added in v0.52.0

func DownloadPublishedChart(ctx context.Context, chart v1alpha1.ZarfChart, chartPath, valuesPath string) error

DownloadPublishedChart loads a specific chart version from a remote repo.

func FindAnnotatedImagesForChart

func FindAnnotatedImagesForChart(chartPath string, values chartutil.Values) (images []string, err error)

FindAnnotatedImagesForChart attempts to parse any image annotations found in a chart archive or directory.

func InstallOrUpgradeChart added in v0.52.0

func InstallOrUpgradeChart(ctx context.Context, zarfChart v1alpha1.ZarfChart, chart *chart.Chart, values chartutil.Values, opts InstallUpgradeOptions) (state.ConnectStrings, string, error)

InstallOrUpgradeChart performs a helm install of the given chart.

func LoadChartData added in v0.52.0

func LoadChartData(zarfChart v1alpha1.ZarfChart, chartPath string, valuesPath string, valuesOverrides map[string]any) (*chart.Chart, chartutil.Values, error)

LoadChartData loads a chart from a tarball and returns the Helm SDK representation of the chart and it's values

func PackageChart added in v0.52.0

func PackageChart(ctx context.Context, chart v1alpha1.ZarfChart, chartPath, valuesPath string) error

PackageChart creates a chart archive from a path to a chart on the host os and builds chart dependencies

func PackageChartFromGit added in v0.52.0

func PackageChartFromGit(ctx context.Context, chart v1alpha1.ZarfChart, chartPath, valuesPath string) error

PackageChartFromGit is a special implementation of chart archiving that supports the https://p1.dso.mil/#/products/big-bang/ model.

func PackageChartFromLocalFiles added in v0.52.0

func PackageChartFromLocalFiles(ctx context.Context, chart v1alpha1.ZarfChart, chartPath string, valuesPath string) error

PackageChartFromLocalFiles creates a chart archive from a path to a chart on the host os.

func RemoveChart added in v0.52.0

func RemoveChart(ctx context.Context, namespace string, name string, timeout time.Duration) error

RemoveChart removes a chart from the cluster.

func StandardName

func StandardName(destination string, chart v1alpha1.ZarfChart) string

StandardName generates a predictable full path for a helm chart for Zarf.

func StandardValuesName

func StandardValuesName(destination string, chart v1alpha1.ZarfChart, idx int) string

StandardValuesName generates a predictable full path for the values file for a helm chart for zarf

func TemplateChart added in v0.52.0

func TemplateChart(ctx context.Context, zarfChart v1alpha1.ZarfChart, chart *chart.Chart, values chartutil.Values,
	kubeVersion string, variableConfig *variables.VariableConfig, isInteractive bool) (string, error)

TemplateChart generates a helm template from a given chart.

func UpdateReleaseValues added in v0.52.0

func UpdateReleaseValues(ctx context.Context, chart v1alpha1.ZarfChart, updatedValues map[string]interface{}, opts InstallUpgradeOptions) error

UpdateReleaseValues updates values for a given chart release (note: this only works on single-deep charts, charts with dependencies (like loki-stack) will not work)

func UpdateZarfAgentValues added in v0.52.0

func UpdateZarfAgentValues(ctx context.Context, opts InstallUpgradeOptions) error

UpdateZarfAgentValues updates the Zarf agent deployment with the new state values

func UpdateZarfRegistryValues added in v0.52.0

func UpdateZarfRegistryValues(ctx context.Context, opts InstallUpgradeOptions) error

UpdateZarfRegistryValues updates the Zarf registry deployment with the new state values

Types

type ChartImage added in v0.65.0

type ChartImage struct {
	// Name of the image.
	Name string `yaml:"name"`
	// Image with tag.
	Image string `yaml:"image"`
	// Condition specifies the values to determine if the image is included or not.
	Condition string `yaml:"condition"`
	// Dependency is the subchart that contains the image, if empty its the parent chart.
	Dependency string `yaml:"dependency"`
}

ChartImage represents a single image entry in the helm.sh/images annotation.

type ChartImages

type ChartImages []ChartImage

ChartImages captures the structure of the helm.sh/images annotation within the Helm chart.

type InstallUpgradeOptions added in v0.56.0

type InstallUpgradeOptions struct {
	// AdoptExistingResources is true if the chart should adopt existing namespaces
	AdoptExistingResources bool
	// VariableConfig is used to template the variables in the chart
	VariableConfig *variables.VariableConfig
	// State is used to update the registry / git server secrets
	State   *state.State
	Cluster *cluster.Cluster
	// AirgapMode is true if the package being installed is not a YOLO package and it helps determine if Zarf state secrets should be updated
	AirgapMode bool
	// Timeout for the helm install/upgrade
	Timeout time.Duration
	// PkgName is the name of the zarf package being installed
	PkgName string
	// NamespaceOverride is the namespace override to use for the chart
	NamespaceOverride string
	// IsInteractive decides if Zarf can interactively prompt users through the CLI
	IsInteractive bool
}

InstallUpgradeOptions provide options for the Helm install/upgrade operation

Jump to

Keyboard shortcuts

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