fix: forge URL + firewall for isolateContainers=true
When containers run in private netns (isolateContainers=true), host loopback is unreachable so HIVE_FORGE_URL=http://127.0.0.1:3000 breaks. - nix/modules/hive-network.nix: when isolateContainers is on + forge is enabled, open forge.httpPort on the bridge interface so agents can reach forgejo at bridgeIp:httpPort (forgejo binds 0.0.0.0) - nix/modules/hive-c0re.nix: HIVE_FORGE_URL switches to bridge IP when network.enable && isolateContainers; loopback path retained when isolateContainers=false - docs/network.md: add Forge access + Forge URL rows to effects table - docs/gateway.md: rewrite HIVE_FORGE_URL section for both modes
This commit is contained in:
parent
6be114eb05
commit
c97120f016
4 changed files with 38 additions and 11 deletions
|
|
@ -200,13 +200,20 @@ dashboard reach by design — the surface is privileged (approve /
|
|||
deny / destroy) and must not be exposed without a real reverse
|
||||
proxy in front.
|
||||
|
||||
## `HIVE_FORGE_URL`: loopback for in-cluster, sub-domain for the operator
|
||||
## `HIVE_FORGE_URL`: bridge gateway for isolated agents, loopback for shared-netns
|
||||
|
||||
Agents poll `HIVE_FORGE_URL` for Forgejo notifications + run all
|
||||
`hive-forge` calls against it. `hive-c0re.nix` pins this to
|
||||
`http://127.0.0.1:<forge.httpPort>` for the in-cluster path: every
|
||||
agent container shares the host's network namespace, so loopback
|
||||
reaches the forge container directly with no DNS lookup needed.
|
||||
`hive-forge` calls against it. `hive-c0re.nix` sets this based on the
|
||||
network isolation mode:
|
||||
|
||||
- **`network.isolateContainers = true`**: agents run in private netns,
|
||||
so host loopback is unreachable. `HIVE_FORGE_URL` is set to
|
||||
`http://<bridgeIp>:<forge.httpPort>`. Forgejo binds `0.0.0.0` so it's
|
||||
reachable at the bridge gateway IP. `hive-network.nix` opens
|
||||
`forge.httpPort` on the bridge interface automatically.
|
||||
- **`network.isolateContainers = false`** (default): agents share the host's
|
||||
network namespace, so loopback reaches forgejo directly. `HIVE_FORGE_URL`
|
||||
is `http://127.0.0.1:<forge.httpPort>`.
|
||||
|
||||
The sub-domain default (`forge.<hive-domain>`) is for **operator
|
||||
browsers + cross-host clients**, not in-cluster traffic. Using the
|
||||
|
|
|
|||
Loading…
Reference in a new issue