Twenty-eight modules' data directories are placed: the root as place ".", a sub-directory named by
its id, and every host-side reference — binds, secrets, own secrets, grants, receives, file paths,
mounts, env-files — as ${dir:<id>}. Resolved on the default root every path is the one the manifest
named before, which the controller's TestPlacedDirectoriesKeepTheirPaths proves over both checkouts;
so no data moves and no machine sees a change. Five directories whose id is not their last segment
keep their path as a placement (novox/hq issue 119, ADR 0112, design 27).
94 lines
2.0 KiB
JSON
94 lines
2.0 KiB
JSON
{
|
|
"module": "route-adapter",
|
|
"version": "1",
|
|
"slug": "radapt",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"provides": [
|
|
{
|
|
"name": "route",
|
|
"scope": "mesh"
|
|
}
|
|
],
|
|
"serves": {
|
|
"route": {}
|
|
},
|
|
"receives": {
|
|
"route": "${dir:routes-dir}/mesh.json"
|
|
},
|
|
"accesses": [
|
|
{
|
|
"path": "/services/traefik/dynamic",
|
|
"mode": "read-write"
|
|
}
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "routes-dir",
|
|
"type": "directory",
|
|
"path": "/var/lib/route-adapter/routes",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "file",
|
|
"path": "${dir:state}/config.json",
|
|
"merge": "json",
|
|
"mode": "0644",
|
|
"content": "{\n \"dynamic\": \"/services/traefik/dynamic\",\n \"entrypoint\": \"websecure\",\n \"certificate-resolver\": \"le\",\n \"machine\": \"host.docker.internal\"\n}\n"
|
|
},
|
|
{
|
|
"id": "adapt",
|
|
"type": "container",
|
|
"name": "mesh-route-adapter",
|
|
"artifact": "runtime",
|
|
"run-once": true,
|
|
"volumes": [
|
|
"${dir:routes-dir}/mesh.json:${dir:routes-dir}/mesh.json:ro",
|
|
"${dir:state}/config.json:/run/config/config.json:ro",
|
|
"/services/traefik/dynamic:/services/traefik/dynamic"
|
|
],
|
|
"env": {
|
|
"MESH_RECEIVES": "${dir:routes-dir}/mesh.json",
|
|
"MESH_ROUTE_ADAPTER_CONFIG": "/run/config/config.json"
|
|
},
|
|
"args": [
|
|
"run",
|
|
"/app/modules/route-adapter/dist/index.js"
|
|
],
|
|
"restart-on": [
|
|
"received-route",
|
|
"config"
|
|
]
|
|
}
|
|
],
|
|
"build": {
|
|
"on": [
|
|
{
|
|
"arg": "BUILD_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "build"
|
|
},
|
|
{
|
|
"arg": "RUNTIME_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"artifacts": [
|
|
{
|
|
"name": "runtime",
|
|
"kind": "image",
|
|
"from": "Dockerfile"
|
|
}
|
|
]
|
|
}
|
|
}
|