All checks were successful
Run Check Script / check (pull_request) Successful in 3m24s
- 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
23 lines
923 B
Markdown
23 lines
923 B
Markdown
# Application Scores
|
|
|
|
Apps implement [`HarmonyApp`](../../harmony_app/src/app.rs) and return Scores.
|
|
There is no `.with(...)` capability menu and no `ComposeDeploy` /
|
|
`Application` god-object.
|
|
|
|
Compose the Scores that already exist: `K8sPostgreSQLScore`,
|
|
`FleetDeploymentScore`, `HostProcessScore`, `K8sDeploymentScore`, …
|
|
|
|
```rust
|
|
async fn scores(&self, ctx: &AppContext, images: &ImageRefs) -> Result<Vec<Box<dyn Score<T>>>, AppError> {
|
|
let db = K8sPostgreSQLScore::new(ctx.namespace()).cluster_name("app-db");
|
|
let api = K8sDeploymentScore::new("app", "api", images.require("api")?)
|
|
.namespace(ctx.namespace())
|
|
.health_checked_port(8080, "/healthz")
|
|
.env("DATABASE_URL", db.app_account_ref().uri());
|
|
Ok(vec![Box::new(db), Box::new(api)])
|
|
}
|
|
```
|
|
|
|
See [Application CLI](./application-cli.md) for `ship` / `deploy` / `status` /
|
|
`logs`. Authoring DX (one component, one type) is ADR-029.
|