konfig helm
konfig helm groups Helm chart management. It currently has one subcommand, fetch, which downloads every chart in the registry into the local tarball cache ahead of time. Use it to warm a CI cache so that later konfig crd runs do not depend on the chart repositories being reachable. Whether it also warms the cache that konfig build reads at render time depends on the chart: render-time caching keys tarballs by digest, so only charts with a recorded digest are shared (see the caution below); for the others a build still pulls once per chart and digest.
Usage
konfig helm fetch --allFlags (fetch)
| Name | Default | Description |
|---|---|---|
--all | false | Fetch all charts into the local cache. Required; without it the command prints Specify --all to fetch all charts and fails with MissingAllFlag. |
Behaviour
fetch reads the same configuration as konfig crd. Each setting falls back through an environment variable, then the matching konfig.json field, then a built-in default; see konfig.json for the precedence rule and konfig crd for the registry file format.
| Setting | Environment variable | konfig.json field | Default |
|---|---|---|---|
| Chart registry directory | KONFIG_CHARTS_DIR | charts | infra/k8s-konfig/charts |
| Tarball cache | KONFIG_HELM_CACHE | helm.cacheDir | .konfig/helm-cache |
| Minimum Helm version | KONFIG_HELM_MIN_VERSION | helm.minVersion | 3.16.0 |
The command first runs helm version --short and fails with HelmVersionTooLow when helm is absent or too old.
It then walks the registry and prints Fetching <chart>@<version>... for every entry. What happens next depends on whether the entry records a digest:
- With a digest, the chart is pulled into a private temp directory, the tarball’s digest is verified against the recorded one, and the file is renamed into the cache as
<chart>-<version>-<digest12>.tgz. If that file already exists the pull is skipped entirely. - Without a digest, the command runs
helm pull --repo <repo> <chart> --version <version> --destination <cache>unless<cache>/<chart>-<version>.tgzalready exists, and prints a warning that the render-time cache cannot reuse a plain-named entry.
When all entries are done it prints Done. Cache at <cache>.
Exit codes and errors
| Error | When |
|---|---|
MissingAllFlag | --all was not passed. |
HelmVersionTooLow { required, found } | helm is absent or older than the minimum version. |
ChartRegistryError | Loading the chart registry failed. |
ChartRegistryEntryDecodeError | A registry entry does not match the expected shape or patterns. |
| process failures | helm pull exited non-zero. |
Example
KONFIG_HELM_CACHE=~/.cache/konfig-helm konfig helm fetch --all