akua / examples / 14-helm-repo-dep

14-helm-repo-dep

This example covers `repo` dependencies: charts published through an `index.yaml` rather than OCI or a local path. `akua add` resolves the repository index, pins the selected chart archive digest in...

Renders a Helm chart from a classic HTTPS Helm repository, pinned in akua.lock by chart version and tarball digest.

This example covers repo dependencies: charts published through an index.yaml rather than OCI or a local path. akua add resolves the repository index, pins the selected chart archive digest in akua.lock, and registers the chart as charts.podinfo for KCL rendering. Render uses Akua's embedded Helm engine; no Helm binary or shell-out is needed.

What's here

filepurpose
package.kImports charts.podinfo and renders it with typed values.
akua.tomlDeclares the podinfo chart from https://stefanprodan.github.io/podinfo.
akua.lockPins chart version 6.12.0 and the fetched archive digest.
rendered/Reference output committed for integration tests.

Render

akua render --out ./rendered

Classic Helm repositories are useful when an upstream chart has not moved to OCI yet. The lockfile still gives the same reproducibility contract: exact chart version, exact digest, repeatable render.

package.k

# Package that pulls podinfo from the classic HTTPS Helm repository at
# stefanprodan.github.io/podinfo and renders it with a typed values shape.
#
# `import charts.podinfo` resolves through the `podinfo` dep in akua.toml:
# the resolver fetches the versioned `.tgz` from the repository's index.yaml,
# pins its sha256 in akua.lock, and registers the unpacked chart as the
# `charts.podinfo` KCL module. No Helm binary required; no shell-out.
#
# Render (requires `akua add` online first to populate the cache):
#
#   akua render --out ./rendered
#
# The dep source is `repo`/`chart`/`version` rather than `oci` or `path` —
# the same resolver machinery, a different transport. Compare with example 01
# (local path dep) and example 10 (OCI dep) to see all three dep forms.

import charts.podinfo as p

resources = p.template(p.TemplateOpts {
    values = {
        replicaCount = 1
    }
})

Source: examples/14-helm-repo-dep/