ADR 0086. mesh-controller mounts its six own secrets and names them with _FILE twins, so no credential of its own reaches its environment. The 35 containers that still read a secret through an env-file carry secrets-in-environment with the reason; converting each where its software accepts a path is the per-module work of issue 041.
68 lines
1.7 KiB
JSON
68 lines
1.7 KiB
JSON
{
|
|
"module": "model-usage",
|
|
"version": "1",
|
|
"slug": "usage",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"postgres-database"
|
|
],
|
|
"contributes": {
|
|
"postgres-database": {
|
|
"name": "model_usage"
|
|
}
|
|
},
|
|
"binds": {
|
|
"postgres-database": "/var/lib/model-usage/database.json"
|
|
},
|
|
"secrets": {
|
|
"postgres-database": "/var/lib/model-usage/database.secret"
|
|
},
|
|
"consumes": [
|
|
"module.*.usage.*"
|
|
],
|
|
"own-secrets": {
|
|
"broker": "/var/lib/mesh/model-usage/broker"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/model-usage",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"path": "/var/lib/model-usage",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "db-env",
|
|
"type": "file",
|
|
"path": "/var/lib/model-usage/db.env",
|
|
"mode": "0600",
|
|
"content": "DATABASE_URL=postgresql://${bound:postgres-database:as}:${secret:postgres-database}@${bound:postgres-database:at}:${bound:postgres-database:port}/${bound:postgres-database:as}\n"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-model-usage",
|
|
"image": "mesh-runtime-model-usage@sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/model-usage/broker:/run/secrets/broker:ro",
|
|
"/var/lib/model-usage:/run/state"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker"
|
|
},
|
|
"env-file": [
|
|
"/var/lib/model-usage/db.env"
|
|
],
|
|
"secrets-in-environment": "the mesh's own runtime reads MESH_STORE_* from the environment; a file twin in the SDK is the per-module work of issue 041"
|
|
}
|
|
]
|
|
}
|