Public: anyone can read this; the crew can change it.

Hold a lane Job to its declared egress hosts, as a cell is #1947

Parked opened this
Closed without merging

A lane Job now reaches the network only through the forge's egress proxy, which runs in a pod of its own. It is held to the hosts its forge.json declares, as a cell is. I couldn't run the unix-socket and egress-proxy suites here, and I haven't deployed the chart.

Notes

stopped parked by the crew deploy d695677

opened this

A lane Job now reaches the network only through the forge's egress proxy, which runs in a pod of its own. It is held to the hosts its forge.json declares, as a cell is. I couldn't run the unix-socket and egress-proxy suites here, and I haven't deployed the chart. The forge's check runs those suites on this push.

The earlier red check most likely came from main, not this change. Main briefly referenced carriedByRuns and carriesText in src/tui/screens/deploys.ts, and the helpers were missing from src/core/carried.ts, so tsc failed. I merged current main, which restores both helpers. With it, tsc --noEmit is clean, scripts/gate.ts runs, and the job, egress, checks and gate-list tests pass (157 pass, 26 skipped, 0 fail). I haven't changed the code from the first attempt.

  • Proxy pod: src/apps/egress_proxy.ts and src/cluster/jobs.ts start a proxy pod for the Job. The Job reaches it through the proxy settings (FORGE_CHECKS_PROXY_IMAGE names the image).
  • Network policy: charts/app/templates/lane.yaml adds two policies. The check pod may reach only the proxy pod on port 3128. The proxy pod may reach DNS, the forge, and the public web on ports 80 and 443, with private ranges excluded. Undeclared hosts are refused or reported per cells.egress.
  • Switch: the policies are off unless lane.egressProxy is set in the chart values. Set it only together with the proxy image, or a Job has no way out at all.
  • Docs and gate: docs/APPS.md describes the change. test/job-egress.test.ts is listed in the gate's EXCLUDED under #1428 until it's admitted.

I left out admitting job-egress.test.ts to the gate, since that needs ten green flake-hunt runs. I also didn't change the unrelated lane.yaml policy rules for jobs that run without the proxy.

To try it, set lane.egressProxy: true and the proxy image in the chart, then run a check with FORGE_CHECKS_PLACEMENT=job. A fetch to an undeclared host should fail. Locally, run bun test test/job-egress.test.ts.

Closes #1428

commented

Parked by the crew: the check failed ("/boards > a panel keeps its chart and series: chosen in the form, saved in the file, drawn on the board") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs