chartutil

package
v1.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package chartutil provides shared Helm chart reference parsing, release naming, namespace selection, and container image extraction from rendered manifests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppNamespace

func AppNamespace(namespace *string, appName string) string

func ExtractImagesFromManifests

func ExtractImagesFromManifests(manifests string) ([]string, error)

ExtractImagesFromManifests parses Kubernetes manifests and returns all container image references. It handles multi-document YAML and extracts images from Pods, Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs, and CronJobs.

func NormalizeChartRef

func NormalizeChartRef(chartRef string) string

NormalizeChartRef ensures a chart reference has the oci:// scheme. If no scheme is present, it assumes OCI and adds the prefix.

func ParseChartRef

func ParseChartRef(chartRef string) (name, version string, err error)

ParseChartRef extracts the chart name and version/digest from a chart reference. Supports both tag-based (oci://registry/chart:version) and digest-based (oci://registry/chart@sha256:...) references.

func SanitizeReleaseName

func SanitizeReleaseName(chartName string) (string, error)

SanitizeReleaseName combines a chart name and version into a valid Helm release name. It lowercases the input, replaces invalid characters with hyphens, removes consecutive hyphens, trims leading/trailing hyphens, and truncates to 53 characters.

func SplitChartRef

func SplitChartRef(chartRef string) (chartPath, version string)

SplitChartRef splits a chart reference into the chart path and version components. For tag-based references (oci://registry/chart:version), returns (oci://registry/chart, version). For digest-based references (oci://registry/chart@sha256:...), returns (chartRef, "") since the digest must remain part of the URL for helm pull.

Types

This section is empty.

Jump to

Keyboard shortcuts

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