Skip to content
Docs menu / konfig helm

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

Terminal window
konfig helm fetch --all

Flags (fetch)

NameDefaultDescription
--allfalseFetch 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.

SettingEnvironment variablekonfig.json fieldDefault
Chart registry directoryKONFIG_CHARTS_DIRchartsinfra/k8s-konfig/charts
Tarball cacheKONFIG_HELM_CACHEhelm.cacheDir.konfig/helm-cache
Minimum Helm versionKONFIG_HELM_MIN_VERSIONhelm.minVersion3.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>.tgz already 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

ErrorWhen
MissingAllFlag--all was not passed.
HelmVersionTooLow { required, found }helm is absent or older than the minimum version.
ChartRegistryErrorLoading the chart registry failed.
ChartRegistryEntryDecodeErrorA registry entry does not match the expected shape or patterns.
process failureshelm pull exited non-zero.

Example

Terminal window
KONFIG_HELM_CACHE=~/.cache/konfig-helm konfig helm fetch --all