helm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 45 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(purgeAllJackalInstallations bool)

Destroy removes JackalInitPackage charts from the cluster and optionally all Jackal-installed charts.

func DownloadChartFromGitToTemp

func DownloadChartFromGitToTemp(url string, spinner *message.Spinner) (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 types.JackalChart) string

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

func StandardValuesName

func StandardValuesName(destination string, chart types.JackalChart, idx int) string

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

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 types.JackalChart, chartPath string, valuesPath string, mods ...Modifier) *Helm

New returns a new Helm config struct.

func NewClusterOnly

func NewClusterOnly(cfg *types.PackagerConfig, cluster *cluster.Cluster) *Helm

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

func NewFromJackalManifest

func NewFromJackalManifest(manifest types.JackalManifest, manifestPath, packageName, componentName string, mods ...Modifier) (h *Helm, err error)

NewFromJackalManifest generates a helm chart and config from a given Jackal manifest.

func (*Helm) DownloadPublishedChart

func (h *Helm) DownloadPublishedChart(cosignKeyPath string) error

DownloadPublishedChart loads a specific chart version from a remote repo.

func (*Helm) InstallOrUpgradeChart

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

InstallOrUpgradeChart performs a helm install of the given chart.

func (*Helm) PackageChart

func (h *Helm) PackageChart(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(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(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(namespace string, name string, spinner *message.Spinner) error

RemoveChart removes a chart from the cluster.

func (*Helm) TemplateChart

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

TemplateChart generates a helm template from a given chart.

func (*Helm) UpdateJackalAgentValues

func (h *Helm) UpdateJackalAgentValues() error

UpdateJackalAgentValues updates the Jackal agent deployment with the new state values

func (*Helm) UpdateJackalRegistryValues

func (h *Helm) UpdateJackalRegistryValues() error

UpdateJackalRegistryValues updates the Jackal registry deployment with the new state values

func (*Helm) UpdateReleaseValues

func (h *Helm) UpdateReleaseValues(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)

type Modifier

type Modifier func(*Helm)

Modifier is a function that modifies the Helm config.

func WithDeployInfo

func WithDeployInfo(component types.JackalComponent, cfg *types.PackagerConfig, 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 WithPackageConfig

func WithPackageConfig(cfg *types.PackagerConfig) Modifier

WithPackageConfig sets the packager config for the chart

Jump to

Keyboard shortcuts

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