Move the route proxy into its module and run it from the trust image, on mesh-sdk's public membership (issues 1633, 1634, 1635)
A bundle is built only from its module's directory (ADR 0480 clause 4), so the proxy leaves examples/ and the controller's internal/broker; the broker keeps no second copy of what the proxy shares with mesh-sdk. The image and its Dockerfile go, and a test holds that only build-agent declares one (clause 11).
This commit is contained in:
@@ -45,15 +45,15 @@ pinned image is not moved without a decision; mesh-controller's
|
||||
|
||||
## How it ships the Go proxy
|
||||
|
||||
The proxy is a Go program, unlike the TypeScript tool-runtime modules. Its source sits in this same
|
||||
repository, mesh-controller, at `examples/route-proxy`, the contract written as something that runs. This
|
||||
module ships the packaging: a multi-stage [`Dockerfile`](Dockerfile) whose build context is the repository
|
||||
root and which compiles `./examples/route-proxy` into `mesh-route-proxy`. The committed `module.json` carries the
|
||||
placeholder digest every mesh-built image does (`@sha256:0000…`); the mesh pins the real digest at
|
||||
publish.
|
||||
The proxy is a Go program, unlike the TypeScript tool-runtime modules. Its source sits in this module, at
|
||||
`cmd/route-proxy`, in the module's own Go module (`go.mod`, with a `vendor/` directory), the contract written as
|
||||
something that runs. No image is built for it (novox/hq ADR 0480): the `server` artifact is a Go bundle compiled
|
||||
for alpine, an `archive` resource unpacks it onto the machine, and the `route-proxy` container runs the pinned
|
||||
`trust` image (the same alpine digest whose system roots the public account directory is named after) with the
|
||||
archive mounted read-only at `/opt/mesh` and `/opt/mesh/route-proxy` as its program. A new build of the program
|
||||
restarts the container, because the archive is in its `restart-on`.
|
||||
|
||||
In the lab, `mesh-lab/scripts/build-route-proxy-image.sh` builds this into the local daemon as
|
||||
`mesh-route-proxy:development`, and a scenario stocks it and serves it by digest.
|
||||
In the lab, a scenario stocks the same alpine image and serves it by digest.
|
||||
|
||||
## Certificates, and the endpoint (resolves 04-ISSUES/004)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user