Skip to main content

Module chart

Module chart 

Source
Expand description

Charts as data: Chart.yaml, Chart.lock, values, schema, templates and subcharts, loaded natively from a directory or a .tgz archive without the helm binary.

Everything mirrors Helm v4.3.0 (pkg/chart/loader, pkg/chart/v2, pkg/ignore):

  • Helm 4.3’s loader dispatches on apiVersion: v1, v2 and a missing one load as v2 charts, v3 loads as an (internal, experimental) v3 chart, anything else is rejected. v3 differs in defaulting apiVersion to v3 and not understanding requirements.yaml. Helm 4.3’s actions (install, template, …) still reject v3 charts.
  • A directory honours .helmignore (plus the default templates/.?*); an archive does not.
  • Loading stops at 100 MiB of decompressed content; archive paths are checked for absolute paths, .., drive letters and a stray top-level Chart.yaml.
  • A leading UTF-8 byte order mark is dropped from every file.

Structs§

Chart
A chart: loaded from a directory or archive, or decoded from the chart embedded in a release record (Go chart.Chart JSON, which Serialize and Deserialize mirror exactly).
Dependency
A chart dependency, in Chart.yaml dependencies and Chart.lock.
File
A file of a chart: its path relative to the chart root, slash separated, and its bytes.
Lock
The Chart.lock model.
Maintainer
A chart maintainer (Chart.yaml maintainers).
Metadata
The Chart.yaml model. A YAML null inside maintainers or dependencies is kept as None so that Metadata::validate can reject it like Helm.
Rules
An ordered collection of ignore patterns.
ValidationError
A violation found by Metadata::validate; the text is Helm’s ValidationError.

Enums§

Error
Everything that can go wrong reading a chart.
IgnoreError
A .helmignore pattern that cannot be used.
YamlError
A YAML document that Helm would refuse to turn into JSON.

Constants§

HELM_IGNORE
File name of an ignore file inside a chart.
MAX_DECOMPRESSED_SIZE
Helm’s archive.MaxDecompressedChartSize: 100 MiB of decompressed content per chart (shared by a chart’s whole tree for directories, per archive for archives).

Functions§

archive_digest
SHA-256 of the archive at path, lowercase hex.
hash_dependencies
The digest: of Chart.lock for a chart: Helm’s resolver.HashReq.
hash_dependencies_v2
The Helm 2 flavour of the lock digest, resolver.HashV2Req, still accepted for apiVersion: v1 charts.
is_valid_semver
Reports whether version is accepted by semver.NewVersion of Masterminds semver v3, which is Version::parse.
read_values
Parses the text of a values file; see read_values_file.
read_values_file
Reads a values file (.yaml or .json) the way Helm reads -f files and values.yaml.