Documentation
¶
Overview ¶
Package chartutil provides shared Helm chart reference parsing, release naming, namespace selection, and container image extraction from rendered manifests.
Index ¶
- func AppNamespace(namespace *string, appName string) string
- func ExtractImagesFromManifests(manifests string) ([]string, error)
- func NormalizeChartRef(chartRef string) string
- func ParseChartRef(chartRef string) (name, version string, err error)
- func SanitizeReleaseName(chartName string) (string, error)
- func SplitChartRef(chartRef string) (chartPath, version string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppNamespace ¶
func ExtractImagesFromManifests ¶
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 ¶
NormalizeChartRef ensures a chart reference has the oci:// scheme. If no scheme is present, it assumes OCI and adds the prefix.
func ParseChartRef ¶
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 ¶
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 ¶
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.