test(deploy): Doctor must check the client-address configuration the API runs
Behind the reference proxy the API runs in trusted-proxy mode, but compose.proxy.yaml gives those variables to `api` only. The documented Doctor command runs as `migrate`, so it validated an empty configuration and reported "Direct client-address mode" for an installation that trusts its proxy. That is what the first production installation saw. Fails today: - deploy.test.ts: the proxy overlay gives `migrate` no client-address environment; - doctor.test.ts: the check does not say whose configuration it read; - smoke-deploy.sh: Doctor through the proxy overlay does not report trusted-proxy mode (Docker). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b2efb4b029
commit
2a64383af5
@@ -153,6 +153,11 @@ describe("reference deployment compose files", () => {
|
||||
EKKLESIA_CLIENT_ADDRESS_MODE: "trusted-proxy",
|
||||
EKKLESIA_CLIENT_ADDRESS_TRUSTED_PROXIES: `${proxyAddress}/32`,
|
||||
});
|
||||
// Doctor runs as `migrate`. Given anything else, it validates a configuration the API is not
|
||||
// running, and reports "Direct" for an installation that trusts its proxy.
|
||||
expect(proxyOverlay.services?.migrate?.environment).toEqual(
|
||||
proxyOverlay.services?.api?.environment,
|
||||
);
|
||||
expect(proxyOverlay.networks?.edge?.ipam?.config).toEqual([
|
||||
{
|
||||
ip_range: "${EKKLESIA_EDGE_DYNAMIC_RANGE:-10.249.250.0/25}",
|
||||
|
||||
Reference in New Issue
Block a user