akua / examples / 09-kustomize-hello
09-kustomize-hello
Smallest Package that exercises akua's `kustomize.build` engine callable end-to-end.
Renders end-to-end via the embeddedkustomize-engine-wasm. Nokustomizebinary on$PATHneeded or consulted. Kustomize runs inside a wasmtime WASI sandbox against an in-memory filesystem unpacked from a tar.gz sent over the WASM ABI. Seedocs/security-model.md+docs/roadmap.mdPhase 3.
Smallest Package that exercises akua's kustomize.build engine callable end-to-end.
What's here
| file | purpose |
|---|---|
package.k | KCL Package; imports akua.kustomize, calls kustomize.build("./overlay"), wires the result into resources. |
akua.toml | Manifest — no external deps. |
base/ | Base layer — a single ConfigMap. |
overlay/ | Overlay — adds a namePrefix + commonLabels. |
Render
task build:kustomize-engine-wasm # once per machine
akua render --package examples/09-kustomize-hello/package.k --out ./rendered
The rendered ConfigMap lands at ./rendered/000-configmap-prod-hello.yaml — named prod-hello with the overlay's env: prod label applied. Checked in alongside the example so you can eyeball the output without running anything.
Spec
See docs/package-format.md for the Package shape and docs/cli.md akua render.
package.k
# Minimal Package that exercises the `kustomize.build` plugin callable.
#
# Wraps the adjacent `./overlay/` (which layers a namePrefix + labels
# onto `./base/`) through akua's shell-out kustomize engine. Requires
# the `engine-kustomize-shell` crate feature + a `kustomize` binary on
# PATH.
#
# Render:
#
# akua render --package examples/09-kustomize-hello/package.k --out ./rendered
#
# No inputs — the kustomization tree is fully declarative.
import akua.kustomize
_manifests = kustomize.build(kustomize.Build {
path = "./overlay"
})
resources = _manifests
Rendered output
000-configmap-prod-hello.yaml
apiVersion: v1
data:
greeting: hello from kustomize base
kind: ConfigMap
metadata:
labels:
env: prod
name: prod-hello
Source: examples/09-kustomize-hello/