helmutils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelmChartLabel           = "HelmChart"           // Chart name from Chart.yaml metadata.Name
	HelmReleaseLabel         = "HelmRelease"         // Release name specified by user
	HelmChartAPIVersionLabel = "HelmChartAPIVersion" // Chart API version from Chart.yaml metadata.APIVersion (e.g., "v2")
	HelmChartVersionLabel    = "HelmChartVersion"    // Chart version from Chart.yaml metadata.Version (semver)
	HelmAppVersionLabel      = "HelmAppVersion"      // Application version from Chart.yaml metadata.AppVersion
)

Helm label constants All label values are sourced from Chart.yaml metadata

Variables

This section is empty.

Functions

func IsHelmChart

func IsHelmChart(unitLabels map[string]string) bool

IsHelmChart determines if a unit is a Helm chart by checking for all required Helm metadata labels. A unit is considered a Helm chart only if it has ALL required Helm labels set with non-empty values. These labels are set by 'cub helm install' and serve as the authoritative indicator. Required labels: HelmRelease, HelmChart, HelmChartVersion, HelmChartAPIVersion

Types

type HelmMetadata

type HelmMetadata struct {
	ReleaseName     string
	ChartName       string
	ChartAPIVersion string
	ChartVersion    string
	AppVersion      string
}

HelmMetadata represents Helm chart metadata stored in unit labels

func ExtractHelmMetadata

func ExtractHelmMetadata(unitLabels map[string]string, unitSlug string) *HelmMetadata

ExtractHelmMetadata extracts Helm chart metadata from unit labels. Unit labels are set by 'cub helm install' and contain authoritative Helm metadata. If a label is not found, it uses the provided default value or a standard default.

Parameters:

  • unitLabels: Map of unit labels containing Helm metadata
  • unitSlug: The unit slug to use as default for ReleaseName if not found in labels

Returns:

  • *HelmMetadata: Extracted Helm metadata with defaults applied where necessary

Jump to

Keyboard shortcuts

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