helm

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 58 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 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 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 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

Types

type ChartImages

type ChartImages []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"`
}

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

type Helm

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

Helm is a config object for working with helm charts.

func New

func New(chart v1alpha1.ZarfChart, chartPath string, valuesPath string, mods ...Modifier) *Helm

New returns a new Helm config struct.

func NewClusterOnly

func NewClusterOnly(cfg *types.PackagerConfig, variableConfig *variables.VariableConfig, state *types.ZarfState, cluster *cluster.Cluster) *Helm

NewClusterOnly returns a new Helm config struct geared toward interacting with the cluster (not packages)

func NewFromZarfManifest

func NewFromZarfManifest(manifest v1alpha1.ZarfManifest, manifestPath, packageName, componentName string, mods ...Modifier) (h *Helm, err error)

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

func (*Helm) DownloadPublishedChart

func (h *Helm) DownloadPublishedChart(ctx context.Context, cosignKeyPath string) error

DownloadPublishedChart loads a specific chart version from a remote repo.

func (*Helm) InstallOrUpgradeChart

func (h *Helm) InstallOrUpgradeChart(ctx context.Context) (types.ConnectStrings, string, error)

InstallOrUpgradeChart performs a helm install of the given chart.

func (*Helm) PackageChart

func (h *Helm) PackageChart(ctx context.Context, cosignKeyPath string) error

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

func (*Helm) PackageChartFromGit

func (h *Helm) PackageChartFromGit(ctx context.Context, cosignKeyPath string) error

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

func (*Helm) PackageChartFromLocalFiles

func (h *Helm) PackageChartFromLocalFiles(ctx context.Context, cosignKeyPath string) error

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

func (*Helm) RemoveChart

func (h *Helm) RemoveChart(ctx context.Context, namespace string, name string, spinner *message.Spinner) error

RemoveChart removes a chart from the cluster.

func (*Helm) TemplateChart

func (h *Helm) TemplateChart(ctx context.Context) (manifest string, chartValues chartutil.Values, err error)

TemplateChart generates a helm template from a given chart.

func (*Helm) UpdateReleaseValues

func (h *Helm) UpdateReleaseValues(ctx context.Context, updatedValues map[string]interface{}) 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 (*Helm) UpdateZarfAgentValues

func (h *Helm) UpdateZarfAgentValues(ctx context.Context) error

UpdateZarfAgentValues updates the Zarf agent deployment with the new state values

func (*Helm) UpdateZarfRegistryValues

func (h *Helm) UpdateZarfRegistryValues(ctx context.Context) error

UpdateZarfRegistryValues updates the Zarf registry deployment with the new state values

type Modifier

type Modifier func(*Helm)

Modifier is a function that modifies the Helm config.

func WithDeployInfo

func WithDeployInfo(cfg *types.PackagerConfig, variableConfig *variables.VariableConfig, state *types.ZarfState, cluster *cluster.Cluster, valuesOverrides map[string]any, timeout time.Duration, retries int) Modifier

WithDeployInfo adds the necessary information to deploy a given chart

func WithKubeVersion

func WithKubeVersion(kubeVersion string) Modifier

WithKubeVersion sets the Kube version for templating the chart

func WithVariableConfig

func WithVariableConfig(variableConfig *variables.VariableConfig) Modifier

WithVariableConfig sets the variable config for the chart

Jump to

Keyboard shortcuts

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