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,v2and a missing one load as v2 charts,v3loads as an (internal, experimental) v3 chart, anything else is rejected. v3 differs in defaultingapiVersiontov3and not understandingrequirements.yaml. Helm 4.3’s actions (install,template, …) still reject v3 charts. - A directory honours
.helmignore(plus the defaulttemplates/.?*); 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-levelChart.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.ChartJSON, whichSerializeandDeserializemirror exactly). - Dependency
- A chart dependency, in
Chart.yamldependenciesandChart.lock. - File
- A file of a chart: its path relative to the chart root, slash separated, and its bytes.
- Lock
- The
Chart.lockmodel. - Maintainer
- A chart maintainer (
Chart.yamlmaintainers). - Metadata
- The
Chart.yamlmodel. A YAMLnullinsidemaintainersordependenciesis kept asNoneso thatMetadata::validatecan reject it like Helm. - Rules
- An ordered collection of ignore patterns.
- Validation
Error - A violation found by
Metadata::validate; the text is Helm’sValidationError.
Enums§
- Error
- Everything that can go wrong reading a chart.
- Ignore
Error - A
.helmignorepattern that cannot be used. - Yaml
Error - 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:ofChart.lockfor a chart: Helm’sresolver.HashReq. - hash_
dependencies_ v2 - The Helm 2 flavour of the lock digest,
resolver.HashV2Req, still accepted forapiVersion: v1charts. - is_
valid_ semver - Reports whether
versionis accepted bysemver.NewVersionof Masterminds semver v3, which isVersion::parse. - read_
values - Parses the text of a values file; see
read_values_file. - read_
values_ file - Reads a values file (
.yamlor.json) the way Helm reads-ffiles andvalues.yaml.