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 ChartFromZarfManifest(manifest v1alpha1.ZarfManifest, ...) (v1alpha1.ZarfChart, *chart.Chart, error)
- func Destroy(ctx context.Context, purgeAllZarfInstallations bool)
- func DownloadChartFromGitToTemp(ctx context.Context, url string) (string, error)
- func DownloadPublishedChart(ctx context.Context, chart v1alpha1.ZarfChart, chartPath, valuesPath string) error
- func FindAnnotatedImagesForChart(chartPath string, values chartutil.Values) (images []string, err error)
- func InstallOrUpgradeChart(ctx context.Context, zarfChart v1alpha1.ZarfChart, chart *chart.Chart, ...) (state.ConnectStrings, string, error)
- func LoadChartData(zarfChart v1alpha1.ZarfChart, chartPath string, valuesPath string, ...) (*chart.Chart, chartutil.Values, error)
- func PackageChart(ctx context.Context, chart v1alpha1.ZarfChart, chartPath, valuesPath string) error
- func PackageChartFromGit(ctx context.Context, chart v1alpha1.ZarfChart, chartPath, valuesPath string) error
- func PackageChartFromLocalFiles(ctx context.Context, chart v1alpha1.ZarfChart, chartPath string, ...) error
- func RemoveChart(ctx context.Context, namespace string, name string, timeout time.Duration) error
- func StandardName(destination string, chart v1alpha1.ZarfChart) string
- func StandardValuesName(destination string, chart v1alpha1.ZarfChart, idx int) string
- func TemplateChart(ctx context.Context, zarfChart v1alpha1.ZarfChart, chart *chart.Chart, ...) (string, error)
- func UpdateReleaseValues(ctx context.Context, chart v1alpha1.ZarfChart, ...) error
- func UpdateZarfAgentValues(ctx context.Context, opts InstallUpgradeOptions) error
- func UpdateZarfRegistryValues(ctx context.Context, opts InstallUpgradeOptions) error
- type ChartImage
- type ChartImages
- type InstallUpgradeOptions
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 ¶
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 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
RemoveChart removes a chart from the cluster.
func StandardName ¶
StandardName generates a predictable full path for a helm chart for Zarf.
func StandardValuesName ¶
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