Files
harmony/examples/notes
Jean-Gabriel Gill-Couture a0c1da4c51
All checks were successful
Run Check Script / check (pull_request) Successful in 3m24s
feat(k8s): K8sDeploymentScore renders a hardened web workload
- builder: port or health_checked_port (+ ClusterIP Service, HTTP probes),
  typed env (EnvValue), pull secret, replicas, recreate, resources, wait
- labels/selector: component, managed-by, part-of (same as the removed
  Application lowering, so its Deployments apply in place)
- restricted pod: non-root, RuntimeDefault seccomp, drop ALL, no SA token
- lamp: runs as its uid 1000 user and gets the Service its Ingress targets;
  its selector changes from app=<name>, so delete an existing lamp
  Deployment once
- examples: frontends on nginx-unprivileged (8080); docs follow the API
2026-10-23 09:43:52 -04:00
..
2026-09-08 22:10:34 -04:00
2026-09-08 22:10:34 -04:00

notes — ADR-029 example

Frontend, backend, postgres. One type per file. Contexts bind runtimes.

cargo build -p example-notes --bins
cargo run -p example-notes --bin notes -- ship --context localdev
# frontend http://127.0.0.1:15173  backend http://127.0.0.1:18080/  (200 + "ok" when DATABASE_URL is set)

cargo run -p example-notes --bin notes -- ship --context cluster

localdev: host processes + CNPG on k3d (NodePort).
cluster: all containers on the same k3d (nginx + http-echo + CNPG).

Context bind is a struct you fill in (as_command / as_container). Forget a field or postgres.as_command() — compile error, no macro.