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 ¶
- func Destroy(ctx context.Context, purgeAllZarfInstallations bool)
- func DownloadChartFromGitToTemp(ctx context.Context, url string) (string, error)
- func FindAnnotatedImagesForChart(chartPath string, values chartutil.Values) (images []string, err error)
- func StandardName(destination string, chart v1alpha1.ZarfChart) string
- func StandardValuesName(destination string, chart v1alpha1.ZarfChart, idx int) string
- type ChartImages
- type Helm
- func (h *Helm) DownloadPublishedChart(ctx context.Context, cosignKeyPath string) error
- func (h *Helm) InstallOrUpgradeChart(ctx context.Context) (types.ConnectStrings, string, error)
- func (h *Helm) PackageChart(ctx context.Context, cosignKeyPath string) error
- func (h *Helm) PackageChartFromGit(ctx context.Context, cosignKeyPath string) error
- func (h *Helm) PackageChartFromLocalFiles(ctx context.Context, cosignKeyPath string) error
- func (h *Helm) RemoveChart(ctx context.Context, namespace string, name string, spinner *message.Spinner) error
- func (h *Helm) TemplateChart(ctx context.Context) (manifest string, chartValues chartutil.Values, err error)
- func (h *Helm) UpdateReleaseValues(ctx context.Context, updatedValues map[string]interface{}) error
- func (h *Helm) UpdateZarfAgentValues(ctx context.Context) error
- func (h *Helm) UpdateZarfRegistryValues(ctx context.Context) error
- type Modifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Destroy ¶
Destroy removes ZarfInitPackage charts from the cluster and optionally all Zarf-installed charts.
func DownloadChartFromGitToTemp ¶
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 ¶
StandardName generates a predictable full path 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 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 ¶
DownloadPublishedChart loads a specific chart version from a remote repo.
func (*Helm) InstallOrUpgradeChart ¶
InstallOrUpgradeChart performs a helm install of the given chart.
func (*Helm) PackageChart ¶
PackageChart creates a chart archive from a path to a chart on the host os and builds chart dependencies
func (*Helm) PackageChartFromGit ¶
PackageChartFromGit is a special implementation of chart archiving that supports the https://p1.dso.mil/#/products/big-bang/ model.
func (*Helm) PackageChartFromLocalFiles ¶
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 ¶
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 ¶
UpdateZarfAgentValues updates the Zarf agent 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 ¶
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