akua / examples
Examples
Runnable Packages, ordered from simplest to most realistic. Each one has a package.k, inputs, and a committed rendered/ output that integration tests diff against.
-
00-helm-hello — 00-helm-hello
The smallest Package that exercises akua's `helm.template` engine callable end-to-end.
-
01-hello-webapp — Example 01 — hello-webapp
The smallest possible akua Package. One local-path chart dep, an `Input` schema with two fields, raw-manifest output. Teaches the three regions of `package.k` — imports, schema, body — and the...
-
02-webapp-postgres — Example 02 — webapp-postgres
Two Helm charts composed into one Package. A webapp consumes a Postgres connection URL from a Secret the CloudNativePG operator creates — entirely by convention, no runtime late-binding required,...
-
03-multi-env-app — Example 03 — multi-env app
The shape most production workspaces actually use — but importantly, **akua does not specify any of it beyond `Package.k`**. This example shows how a team builds their own "App + Environment"...
-
04-policy-tier — Example 04 — policy tier
A workspace policy gate. Shows the policy stack end-to-end:
-
05-tests-and-golden — Example 05 — tests and golden fixtures
Shows where tests live and what each kind looks like:
-
06-multi-engine — Example 06 — multi-engine
Four source engines composed in one Package, with per-source output routing. Demonstrates:
-
07-package-reuse — Example 07 — package reuse (cross-package composition)
One akua Package composing another. The reuser pins the base Package by OCI digest in `akua.toml`, imports its `Input` schema into its own schema (as a nested field), and renders the base's...
-
08-pkg-compose — 08-pkg-compose
Package composition via `pkg.render` — an outer Package calls a reusable inner Package twice with different inputs and concatenates the results. Renders end-to-end today (pure KCL; no helm needed).
-
09-kustomize-hello — 09-kustomize-hello
Smallest Package that exercises akua's `kustomize.build` engine callable end-to-end.
- 10-kcl-ecosystem — 10-kcl-ecosystem
-
11-install-as-package — 11-install-as-package
Composes a third-party Akua package (`./upstream/`) and applies a tenant overlay, drops a kind, and appends extras — the install-as-Package shape. Demonstrates the natural call form...
-
12-vendor-offline — example 12 — vendor-offline (render without network or auth)
A Package whose dep is materialized into `.akua/vendor//` so render works without re-fetching from the canonical source. This example takes the offline guarantee literally — the canonical...
-
13-subpackage-helm — 13-subpackage-helm
This example shows package composition across a local path dependency. The root `package.k` imports `pkgs.webserver` and calls `webserver.render(webserver.Input{...})`; the `webserver` sub-package...
-
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...