Kubernetes operator that reconciles ComputeUnit CRs (wasm.pleme.io/v1alpha1) into running wasm-engine workloads. ComputeUnit is the canonical Layer-2 typed resource per theory/META-FRAMEWORK.md §I — one CR per running unit of compute, with a sum-typed trigger.
For each ComputeUnit resource, the operator ensures one of:
spec.trigger.kind |
Reconciles to |
|---|---|
oneShot |
Job running the engine once |
cron |
CronJob |
service |
Deployment + Service (+ KEDA ScaledObject if breathability.enabled) |
watch |
Deployment running the engine in controller mode (informer + leader election) |
event |
Deployment subscribed to the configured event source |
The engine pod's container image is ghcr.io/pleme-io/wasm-engine:<tag> (override via WASM_ENGINE_IMAGE env). The engine reads COMPUTEUNIT_MODULE_URL, COMPUTEUNIT_TRIGGER, COMPUTEUNIT_CONFIG, COMPUTEUNIT_CAPABILITIES from its environment.
See theory/WASM-STACK.md for the full design.
- Apply the CRD:
kubectl apply -f crd/computeunit.yaml
- Deploy the operator (Deployment + RBAC ServiceAccount/Role/RoleBinding) — these manifests are owned by the
lareira-wasm-platformHelm chart inhelmworks. - Apply
ComputeUnitCRs — see the example shape incrd/computeunit.yaml's schema ork8s/clusters/rio/programs/release.yaml.
nix develop # devShell with rustc/cargo/kubectl
cargo check # type-check
cargo build --release # native build
nix build .#default # nix-built binary
nix flake check --no-build # evaluate flakeTo run against a real cluster:
export KUBECONFIG=...
cargo run -- --help
kubectl get cu # list ComputeUnits (shortname `cu`)MIT.