apps(farrisilk): lab replica stack (Odoo 18 + plain Postgres + Metabase) on :8086/:8087

Odoo 18 (dated tag 18.0-20261112) on a plain postgres:16 container, not CNPG:
the client runs bare Postgres on a Proxmox VM and this namespace mirrors that
shape. Odoo's initContainer installs base,web once, applies the read-only BI
grants/revokes and sets the admin login from a Secret. Metabase gets its own
state in the same Postgres (db metabase) with a 1Gi heap and
MB_ENCRYPTION_SECRET_KEY. Two bare-IP Gateways (8086 odoo, 8087 metabase) in ns
internal, each with its own RouteConfiguration. Host firewall (nft on siriussec,
ufw on rpi) carries 8086/8087 and was installed before the Gateways were pushed.
This commit is contained in:
Lance Walters 2026-11-22 02:15:56 -05:00
commit 7f7f806616
14 changed files with 874 additions and 6 deletions

View file

@ -0,0 +1,26 @@
# Own Gateway for the Farrisilk lab Metabase (:8087) — see
# gateway-farrisilk-odoo.yaml for why one bare-IP service per Gateway.
#
# This is NOT the evaluation instance in namespace `metabase` (:8085). Same
# reasoning applies to the port choice: one listener port carries exactly one
# internal service, so its route can never compete with another one.
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: farrisilk-metabase
namespace: internal
labels:
dedicated: network
annotations:
sirius.dev/purpose: bare-IP listener for the Farrisilk lab Metabase (WireGuard only)
spec:
gatewayClassName: cilium
listeners:
- name: http-internal
protocol: HTTP
# Verified free 2026-11-22: `ss -lntH "sport = :8087" | wc -l` = 0 on
# siriussec.
port: 8087
allowedRoutes:
namespaces:
from: All

View file

@ -0,0 +1,31 @@
# Own Gateway for Odoo because each bare-IP (hostname-less) service needs its own
# RouteConfiguration: Cilium renders one per Gateway and merges all hostname-less
# routes inside it into a single weighted route. Sharing a Gateway with Grafana
# (8081) / Hubble (8084) / Metabase (8085) or with the sibling :8087 listener
# here would make both ports answer for a random backend.
#
# Port 8086 must be free on EVERY node running cilium-envoy (siriussec 10.10.0.2
# is the only `gateway=true` node). Envoy binds 0.0.0.0:<port> hostNetwork, so
# the host firewall (infrastructure/networking/internal/host-firewall/) must be
# installed BEFORE this is pushed; otherwise the listener is open on the LAN the
# moment it is programmed.
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: farrisilk-odoo
namespace: internal
labels:
dedicated: network
annotations:
sirius.dev/purpose: bare-IP listener for the Farrisilk lab Odoo (WireGuard only)
spec:
gatewayClassName: cilium
listeners:
- name: http-internal
protocol: HTTP
# Verified free 2026-11-22: `ss -lntH "sport = :8086" | wc -l` = 0 on
# siriussec. Taken: 8080 public, 8081 Grafana, 8084 Hubble, 8085 Metabase.
port: 8086
allowedRoutes:
namespaces:
from: All

View file

@ -7,14 +7,16 @@
#
# Ports: 8081 = Grafana (`internal` Gateway listener http-internal),
# 8084 = Hubble UI (`internal` Gateway listener hubble-ui),
# 8085 = Metabase (`metabase` Gateway listener http-internal).
# 8085 = Metabase (`metabase` Gateway listener http-internal),
# 8086 = Farrisilk lab Odoo (`farrisilk-odoo` Gateway),
# 8087 = Farrisilk lab Metabase (`farrisilk-metabase` Gateway).
# Add a new internal listener port to PORTS; the loop is idempotent, so
# re-running after a port is already firewalled only adds what is missing.
#
# Run as root on rpi (192.168.1.125).
set -euo pipefail
PORTS="${PORTS:-8081 8084 8085}"
PORTS="${PORTS:-8081 8084 8085 8086 8087}"
for port in $PORTS; do
if ufw status | grep -q "${port}/tcp"; then

View file

@ -1,6 +1,7 @@
#!/usr/sbin/nft -f
# Internal (WireGuard-only) gateway listeners: TCP 8081 (Grafana), 8084
# (Hubble UI) and 8085 (Metabase).
# (Hubble UI), 8085 (Metabase) and 8086/8087 (Farrisilk lab replica: Odoo,
# Metabase).
#
# Cilium's hostNetwork Envoy binds every Gateway listener on 0.0.0.0, so the
# internal listeners are open on the LAN interface the moment the Gateway is
@ -22,13 +23,13 @@ table inet internal_gw {
type filter hook input priority filter; policy accept;
# local process / kubelet probes
tcp dport { 8081, 8084, 8085 } iifname "lo" counter accept
tcp dport { 8081, 8084, 8085, 8086, 8087 } iifname "lo" counter accept
# WireGuard mesh (Legion = 10.10.0.3, nodes, remote hub spokes)
# and the pod network (in-cluster scrapers, probes)
tcp dport { 8081, 8084, 8085 } ip saddr { 10.10.0.0/24, 10.244.0.0/16 } counter accept
tcp dport { 8081, 8084, 8085, 8086, 8087 } ip saddr { 10.10.0.0/24, 10.244.0.0/16 } counter accept
# everything else: LAN, tailscale, public
tcp dport { 8081, 8084, 8085 } counter drop
tcp dport { 8081, 8084, 8085, 8086, 8087 } counter drop
}
}

View file

@ -5,3 +5,5 @@ resources:
- gateway.yaml
- gateway-hubble-ui.yaml
- gateway-metabase.yaml
- gateway-farrisilk-odoo.yaml
- gateway-farrisilk-metabase.yaml