From 88d56148cc9213ed4c5117272381734cfbbe7932 Mon Sep 17 00:00:00 2001 From: l-nmch Date: Sat, 31 Oct 2026 15:43:26 +0100 Subject: [PATCH] Route console.phorge.fr to the svc cluster in HAProxy Closes phorge-fr/Network#30 --- docs/reference/network-plan.md | 1 + templates/haproxy.cfg.tftpl | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/reference/network-plan.md b/docs/reference/network-plan.md index eab8238..eb1e6ed 100644 --- a/docs/reference/network-plan.md +++ b/docs/reference/network-plan.md @@ -93,6 +93,7 @@ The storage node exports `/mnt/main/csi-svc` over NFSv4 to the three svc nodes a | `api.phorge.fr` | control | Phorge API (`/v1`, OpenAPI and Swagger UI only) | HAProxy, `traefik-public` 10.1.0.11 | | `cap.phorge.fr` | core | Cap (captcha of the Authentik sign-in, only `/assets` and the site key are public) | HAProxy, `traefik-public` 10.2.0.11 | | `git.phorge.fr` | svc | Forgejo | HAProxy, `traefik-public` 10.3.0.11 | +| `console.phorge.fr` | svc | Phorge console (the frontend, not deployed yet) | HAProxy, `traefik-public` 10.3.0.11 | | `iaas.phorge.fr` | compute | Incus API and UI | HAProxy SNI routing to 10.10.0.1-3:8443 (rule `Allow Hproxy to Incus cluster API`, see [flows](#traffic-flows)) | | `prometheus.core.phorge`, `loki.core.phorge`, `openfga.core.phorge` | core | Prometheus, Loki, OpenFGA | `traefik-local` 10.2.0.10, internal CA, basic auth | | `crossview.control.phorge` | control | Crossview (Crossplane UI, authentik SSO) | `traefik-local` 10.1.0.10, internal CA | diff --git a/templates/haproxy.cfg.tftpl b/templates/haproxy.cfg.tftpl index 21045c1..11767c2 100644 --- a/templates/haproxy.cfg.tftpl +++ b/templates/haproxy.cfg.tftpl @@ -79,6 +79,9 @@ frontend http-dispatcher acl host_git hdr(host) -i git.phorge.fr http-request redirect scheme https code 301 if host_git + acl host_console hdr(host) -i console.phorge.fr + http-request redirect scheme https code 301 if host_console + default_backend http-control-ingress frontend sni-dispatcher @@ -102,4 +105,6 @@ frontend sni-dispatcher use_backend https-svc-ingress if { req.ssl_sni -i git.phorge.fr } + use_backend https-svc-ingress if { req.ssl_sni -i console.phorge.fr } + default_backend https-control-ingress