From c6e008121721545bbe396a6383198b42950fa08d Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Thu, 19 Nov 2026 19:33:54 -0500 Subject: [PATCH 01/31] =?UTF-8?q?apps(siriusdevops):=20pin=20contact-api?= =?UTF-8?q?=20to=208642f1a=20(Telegram=20Markdown=E2=86=92HTML=20lead-drop?= =?UTF-8?q?=20fix)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/siriusdevops/deployment-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-api.yaml b/apps/base/siriusdevops/deployment-api.yaml index 43b5bba..79b475e 100644 --- a/apps/base/siriusdevops/deployment-api.yaml +++ b/apps/base/siriusdevops/deployment-api.yaml @@ -21,7 +21,7 @@ spec: kubernetes.io/hostname: siriussec containers: - name: contact-api - image: forgejo.siriusdevops.com/sirius/siriusdevops-contact:f0dde2f48c8224fb80d801ecb0d155c93332dc13 + image: forgejo.siriusdevops.com/sirius/siriusdevops-contact:8642f1a14b1dd9f217e32856b7a9ea0a0c37e3aa imagePullPolicy: IfNotPresent command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8090"] ports: From 1b27ad11208d7725f9735267405021fb304c7a23 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Thu, 19 Nov 2026 22:59:37 -0500 Subject: [PATCH 02/31] apps(osint): pin amd64-fe2b5df369d0 (per-article news blips: geolocation API + map layer) --- apps/base/osint/README.md | 4 ++-- apps/base/osint/app-deployment.yaml | 4 ++-- apps/base/osint/camera-deployment.yaml | 2 +- apps/base/osint/ingester-deployment.yaml | 2 +- apps/base/osint/news-summarizer-deployment.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/base/osint/README.md b/apps/base/osint/README.md index fc41c92..9479733 100644 --- a/apps/base/osint/README.md +++ b/apps/base/osint/README.md @@ -10,12 +10,12 @@ instead of a host Docker container on the Pi. |---|---|---| | `osint-db` | `forgejo…/sirius/osint-dashboard-pg:amd64-c48788d4b614-r2` | TimescaleDB 2 + PostGIS 3 on Postgres 16, `local-path` PVC `osint-pgdata` 15 Gi | | `osint-nats` | `forgejo…/sirius/nats:2.10` | JetStream event bus (`-js -m 8222`) | -| `osint-app` | `forgejo…/sirius/osint-dashboard:amd64-58f71f5b4520` | FastAPI + static HUD; runs `alembic upgrade heads` on start; single-admin auth (`app/auth.py`) — public read-only site, admin-only keys/settings/mutations | +| `osint-app` | `forgejo…/sirius/osint-dashboard:amd64-fe2b5df369d0` | FastAPI + static HUD; runs `alembic upgrade heads` on start; single-admin auth (`app/auth.py`) — public read-only site, admin-only keys/settings/mutations | | `osint-ingester` | same app image | RSS/GDELT/USGS/FIRMS/vessel ingest → NATS → Postgres | | `osint-camera-service` | same app image | public-camera discovery + snapshots (PVC `osint-camera-snapshots` 3 Gi, shared with the app) | | `osint-titiler` | `forgejo…/sirius/titiler:0.26.0` | SAR COG tile proxy, exposed same-origin at `/titiler` | | `osint-news-scraper` | `forgejo…/sirius/osint-news-scraper:amd64-58f71f5b4520` | Scrapy news scraper loop | -| `osint-news-summarizer` | `forgejo…/sirius/osint-news-summarizer:amd64-d04ddc9afacb` | "analyst" — Nous Portal briefs every 15 min + 23:00 recap | +| `osint-news-summarizer` | `forgejo…/sirius/osint-news-summarizer:amd64-fe2b5df369d0` | "analyst" — Nous Portal briefs every 15 min + 23:00 recap | Every workload is pinned to `kubernetes.io/hostname: siriussec` (Gateway/Envoy co-location + local-path PVs). diff --git a/apps/base/osint/app-deployment.yaml b/apps/base/osint/app-deployment.yaml index 91cc7cb..74108c9 100644 --- a/apps/base/osint/app-deployment.yaml +++ b/apps/base/osint/app-deployment.yaml @@ -24,7 +24,7 @@ spec: initContainers: # Wait for Postgres before alembic runs (the entrypoint migrates). - name: wait-for-db - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-58f71f5b4520 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fe2b5df369d0 imagePullPolicy: IfNotPresent command: - python @@ -42,7 +42,7 @@ spec: sys.exit("postgres did not become reachable in 300s") containers: - name: app - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-58f71f5b4520 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fe2b5df369d0 imagePullPolicy: IfNotPresent ports: - containerPort: 8000 diff --git a/apps/base/osint/camera-deployment.yaml b/apps/base/osint/camera-deployment.yaml index 04a79ed..a48bdfc 100644 --- a/apps/base/osint/camera-deployment.yaml +++ b/apps/base/osint/camera-deployment.yaml @@ -23,7 +23,7 @@ spec: kubernetes.io/hostname: siriussec containers: - name: camera-service - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-58f71f5b4520 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fe2b5df369d0 imagePullPolicy: IfNotPresent command: ["python", "app/run_camera_service.py"] envFrom: diff --git a/apps/base/osint/ingester-deployment.yaml b/apps/base/osint/ingester-deployment.yaml index 6d5e711..047a55a 100644 --- a/apps/base/osint/ingester-deployment.yaml +++ b/apps/base/osint/ingester-deployment.yaml @@ -23,7 +23,7 @@ spec: kubernetes.io/hostname: siriussec containers: - name: ingester - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-58f71f5b4520 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fe2b5df369d0 imagePullPolicy: IfNotPresent command: ["python", "app/run_ingester.py"] envFrom: diff --git a/apps/base/osint/news-summarizer-deployment.yaml b/apps/base/osint/news-summarizer-deployment.yaml index edfec15..163b6d0 100644 --- a/apps/base/osint/news-summarizer-deployment.yaml +++ b/apps/base/osint/news-summarizer-deployment.yaml @@ -23,7 +23,7 @@ spec: kubernetes.io/hostname: siriussec containers: - name: news-summarizer - image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-d04ddc9afacb + image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fe2b5df369d0 imagePullPolicy: IfNotPresent # Loop: batch the last window, call Nous Portal, write summaries. command: ["python", "run_news_summarizer.py"] From 7ae4ac2ee3dc98890d146b74aee1d8e4cdc9581b Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Thu, 19 Nov 2026 23:36:56 -0500 Subject: [PATCH 03/31] =?UTF-8?q?docs(osint):=20CI=20builds=20the=20amd64?= =?UTF-8?q?=20cluster=20images=20now=20=E2=80=94=20retire=20the=20manual-b?= =?UTF-8?q?uild=20instructions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/osint/README.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/apps/base/osint/README.md b/apps/base/osint/README.md index 9479733..fad61ac 100644 --- a/apps/base/osint/README.md +++ b/apps/base/osint/README.md @@ -22,18 +22,30 @@ co-location + local-path PVs). ## Images -The upstream CI (`.forgejo/workflows/build.yml` in `sirius/osint-dashboard`) -builds **arm64** for the Pi via `runs-on: docker`. The cluster is amd64, so the -cluster images were built on an amd64 host and pushed to the Forgejo registry -over a `kubectl -n forgejo port-forward svc/forgejo 3000:3000` (Cloudflare -rejects layer uploads ≳100 MB on the public hostname). **Build from a detached -worktree at the merge sha, never from the main checkout** — Legion's -`~/osint-dashboard` sits on a feature branch, and a `docker build` there once -produced a `:amd64-` image that carried the right tag and none of the -commit's code (that tag was deleted from the registry; `-r1` is the real build). +**CI builds the cluster images.** Since PR #63 in `sirius/osint-dashboard`, +`.forgejo/workflows/build.yml` runs on the `amd64` runner (`runs-on: amd64`), +tags `amd64-`, and pushes straight into the in-cluster registry +(`forgejo.forgejo.svc.cluster.local:3000`, plain HTTP, whitelisted by +`--insecure-registry` on the runner's dind). Deploying is then just a pin +change here in `apps/base/osint/` — check the run's `## Pin in homek8s` summary +for the exact tags. Builds are **path-filtered**, so one image can be several +commits older than another: the app tag is normally master tip, the summarizer +tag is whichever commit last touched `news/summerizer/`. + +Do not build these by hand and push over a `:amd64-` tag: that replaces +CI's manifest, and Forgejo's registry garbage-collects the displaced digest, so +the CI artifact cannot be pulled back. If you need a tag rebuilt, dispatch CI +instead: `POST /api/v1/repos/sirius/osint-dashboard/actions/workflows/build.yml/dispatches` +with `{"ref":"master","inputs":{"rebuild_all":"true"}}`. + +Manual builds exist only as a historical fallback (pre-#63 images, or a CI +outage) — and then **build from a detached worktree at the merge sha, never +from the main checkout**: Legion's `~/osint-dashboard` sits on a feature +branch, and a `docker build` there once produced a `:amd64-` image that +carried the right tag and none of the commit's code. ```bash -# from the manifests repo root; build the merge sha, not whatever the checkout has +# fallback only — the normal path is: let CI build, then pin the tag here git -C ~/osint-dashboard fetch origin git -C ~/osint-dashboard worktree add --detach /tmp/osint-build origin/master cd /tmp/osint-build && SHA=$(git rev-parse --short=12 HEAD) && TAG="amd64-$SHA" From 24785a54e8ddd8115d04c4fddde31d80d14d336a Mon Sep 17 00:00:00 2001 From: devops Date: Thu, 19 Nov 2026 23:48:48 -0500 Subject: [PATCH 04/31] apps(osint): pin amd64-915f6cbe25be (critical-news renderer fix + Blue Marble default + slower ticker) --- apps/base/osint/README.md | 2 +- apps/base/osint/app-deployment.yaml | 4 ++-- apps/base/osint/camera-deployment.yaml | 2 +- apps/base/osint/ingester-deployment.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/base/osint/README.md b/apps/base/osint/README.md index fad61ac..eb44b51 100644 --- a/apps/base/osint/README.md +++ b/apps/base/osint/README.md @@ -10,7 +10,7 @@ instead of a host Docker container on the Pi. |---|---|---| | `osint-db` | `forgejo…/sirius/osint-dashboard-pg:amd64-c48788d4b614-r2` | TimescaleDB 2 + PostGIS 3 on Postgres 16, `local-path` PVC `osint-pgdata` 15 Gi | | `osint-nats` | `forgejo…/sirius/nats:2.10` | JetStream event bus (`-js -m 8222`) | -| `osint-app` | `forgejo…/sirius/osint-dashboard:amd64-fe2b5df369d0` | FastAPI + static HUD; runs `alembic upgrade heads` on start; single-admin auth (`app/auth.py`) — public read-only site, admin-only keys/settings/mutations | +| `osint-app` | `forgejo…/sirius/osint-dashboard:amd64-915f6cbe25be` | FastAPI + static HUD; runs `alembic upgrade heads` on start; single-admin auth (`app/auth.py`) — public read-only site, admin-only keys/settings/mutations | | `osint-ingester` | same app image | RSS/GDELT/USGS/FIRMS/vessel ingest → NATS → Postgres | | `osint-camera-service` | same app image | public-camera discovery + snapshots (PVC `osint-camera-snapshots` 3 Gi, shared with the app) | | `osint-titiler` | `forgejo…/sirius/titiler:0.26.0` | SAR COG tile proxy, exposed same-origin at `/titiler` | diff --git a/apps/base/osint/app-deployment.yaml b/apps/base/osint/app-deployment.yaml index 74108c9..93ebf7f 100644 --- a/apps/base/osint/app-deployment.yaml +++ b/apps/base/osint/app-deployment.yaml @@ -24,7 +24,7 @@ spec: initContainers: # Wait for Postgres before alembic runs (the entrypoint migrates). - name: wait-for-db - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fe2b5df369d0 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-915f6cbe25be imagePullPolicy: IfNotPresent command: - python @@ -42,7 +42,7 @@ spec: sys.exit("postgres did not become reachable in 300s") containers: - name: app - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fe2b5df369d0 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-915f6cbe25be imagePullPolicy: IfNotPresent ports: - containerPort: 8000 diff --git a/apps/base/osint/camera-deployment.yaml b/apps/base/osint/camera-deployment.yaml index a48bdfc..4b3d0f8 100644 --- a/apps/base/osint/camera-deployment.yaml +++ b/apps/base/osint/camera-deployment.yaml @@ -23,7 +23,7 @@ spec: kubernetes.io/hostname: siriussec containers: - name: camera-service - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fe2b5df369d0 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-915f6cbe25be imagePullPolicy: IfNotPresent command: ["python", "app/run_camera_service.py"] envFrom: diff --git a/apps/base/osint/ingester-deployment.yaml b/apps/base/osint/ingester-deployment.yaml index 047a55a..796f336 100644 --- a/apps/base/osint/ingester-deployment.yaml +++ b/apps/base/osint/ingester-deployment.yaml @@ -23,7 +23,7 @@ spec: kubernetes.io/hostname: siriussec containers: - name: ingester - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fe2b5df369d0 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-915f6cbe25be imagePullPolicy: IfNotPresent command: ["python", "app/run_ingester.py"] envFrom: From e63ba147913b5447ac85441aac9c30931d3eb706 Mon Sep 17 00:00:00 2001 From: devops Date: Fri, 20 Nov 2026 18:31:15 -0500 Subject: [PATCH 05/31] apps(siriusdevops): pin site to 799afe40 (DevOps-repositioned build) --- apps/base/siriusdevops/deployment-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-site.yaml b/apps/base/siriusdevops/deployment-site.yaml index 5b0d145..5be80b1 100644 --- a/apps/base/siriusdevops/deployment-site.yaml +++ b/apps/base/siriusdevops/deployment-site.yaml @@ -75,7 +75,7 @@ spec: memory: 128Mi containers: - name: nginx - image: forgejo.siriusdevops.com/sirius/siriusdevops-site:c704a2e6ab83ef65780c571ac0220a3268c93101 + image: forgejo.siriusdevops.com/sirius/siriusdevops-site:799afe40192182cd418652a638376f06e3b1adeb imagePullPolicy: IfNotPresent ports: - containerPort: 80 From 9ad79263ab07499899300d4ac577ba6be5ffd3d9 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Fri, 20 Nov 2026 18:46:17 -0500 Subject: [PATCH 06/31] apps(forgejo): disable self-registration (FORGEJO__service__DISABLE_REGISTRATION=true) Bot signups: 5845 accounts, /user/sign_up served 200. Lock to admin-only account creation via env (config is env-driven, not app.ini). --- apps/base/forgejo/deployment.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/base/forgejo/deployment.yaml b/apps/base/forgejo/deployment.yaml index 680a922..4a430ea 100644 --- a/apps/base/forgejo/deployment.yaml +++ b/apps/base/forgejo/deployment.yaml @@ -55,6 +55,9 @@ spec: value: "true" - name: FORGEJO__packages__ENABLED value: "true" + # Bot signup lockdown: admin-only account creation (web + API). + - name: FORGEJO__service__DISABLE_REGISTRATION + value: "true" volumeMounts: - name: data mountPath: /data From f969dcf4ca216816775e3b09cd7504722d6c4cef Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 16:24:09 -0500 Subject: [PATCH 07/31] storage: add linode-local StorageClass + provisioner (local-path-linode) Adds an independent local-path-provisioner pinned to the linode worker with its own ConfigMap (local-path-config-linode), helper pod, and StorageClass local-path-linode. The existing siriussec provisioner, its ConfigMap, the local-path StorageClass (still the cluster default) and every existing PVC/PV are untouched. --- infrastructure/storage/kustomization.yaml | 1 + infrastructure/storage/local-path-linode.yaml | 122 ++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 infrastructure/storage/local-path-linode.yaml diff --git a/infrastructure/storage/kustomization.yaml b/infrastructure/storage/kustomization.yaml index e317fb0..6a6e563 100644 --- a/infrastructure/storage/kustomization.yaml +++ b/infrastructure/storage/kustomization.yaml @@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - local-path-storage.yaml + - local-path-linode.yaml diff --git a/infrastructure/storage/local-path-linode.yaml b/infrastructure/storage/local-path-linode.yaml new file mode 100644 index 0000000..f432cbd --- /dev/null +++ b/infrastructure/storage/local-path-linode.yaml @@ -0,0 +1,122 @@ +# Second local-path provisioner, pinned to the `linode` worker. +# +# The original `local-path` StorageClass keeps its single-replica provisioner on +# siriussec (and its helper pod pinned there), so a PVC consumed by a pod on +# linode would have its directory created on the ThinkPad's disk. This file adds +# an independent provisioner + StorageClass whose volumes live on linode's own +# disk. `local-path` remains the cluster default; nothing here touches it. +# +# Volumes land under /opt/local-path-provisioner/pvc-__ on linode. +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: local-path-config-linode + namespace: local-path-storage +data: + config.json: |- + { + "nodePathMap":[ + { + "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", + "paths":["/opt/local-path-provisioner"] + }, + { + "node":"linode", + "paths":["/opt/local-path-provisioner"] + } + ] + } + setup: |- + #!/bin/sh + set -eu + mkdir -m 0777 -p "$VOL_DIR" + teardown: |- + #!/bin/sh + set -eu + rm -rf "$VOL_DIR" + helperPod.yaml: |- + apiVersion: v1 + kind: Pod + metadata: + name: helper-pod + spec: + priorityClassName: system-node-critical + nodeSelector: + kubernetes.io/hostname: linode + tolerations: + - key: node.kubernetes.io/disk-pressure + operator: Exists + effect: NoSchedule + - key: dedicated + operator: Equal + value: network + effect: PreferNoSchedule + containers: + - name: helper-pod + image: busybox + imagePullPolicy: IfNotPresent +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: local-path-provisioner-linode + namespace: local-path-storage +spec: + replicas: 1 + selector: + matchLabels: + app: local-path-provisioner-linode + template: + metadata: + labels: + app: local-path-provisioner-linode + spec: + serviceAccountName: local-path-provisioner-service-account + nodeSelector: + kubernetes.io/hostname: linode + tolerations: + - key: dedicated + operator: Equal + value: network + effect: PreferNoSchedule + containers: + - name: local-path-provisioner + image: rancher/local-path-provisioner:v0.0.31 + imagePullPolicy: IfNotPresent + command: + - local-path-provisioner + - --debug + - start + - --config + - /etc/config/config.json + - --provisioner-name + - rancher.io/local-path-linode + - --configmap-name + - local-path-config-linode + volumeMounts: + - name: config-volume + mountPath: /etc/config/ + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONFIG_MOUNT_PATH + value: /etc/config/ + - name: KUBERNETES_SERVICE_HOST + value: "10.10.0.2" + - name: KUBERNETES_SERVICE_PORT + value: "6443" + volumes: + - name: config-volume + configMap: + name: local-path-config-linode +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: local-path-linode +provisioner: rancher.io/local-path-linode +volumeBindingMode: WaitForFirstConsumer +reclaimPolicy: Delete From b55ec826c909fe19bafd853c14bcc39290aa31af Mon Sep 17 00:00:00 2001 From: devops Date: Sat, 21 Nov 2026 16:24:16 -0500 Subject: [PATCH 08/31] apps(osint): place stateless CPU workers on the amd64 linode node news-scraper, news-summarizer, ingester and nats were hard-pinned to siriussec (the ThinkPad, on a 15 W USB-C supply that brownouts under load). Replace the hostname pin with: * nodeSelector kubernetes.io/arch=amd64 (keeps them off the arm64 rpi) * preferred nodeAffinity weight 100 for kubernetes.io/hostname=linode still falling back to siriussec if linode is down. No PVCs, images, resources or taints touched. --- apps/base/osint/ingester-deployment.yaml | 16 +++++++++++++++- apps/base/osint/nats-deployment.yaml | 16 +++++++++++++++- apps/base/osint/news-scraper-deployment.yaml | 16 +++++++++++++++- apps/base/osint/news-summarizer-deployment.yaml | 16 +++++++++++++++- 4 files changed, 60 insertions(+), 4 deletions(-) diff --git a/apps/base/osint/ingester-deployment.yaml b/apps/base/osint/ingester-deployment.yaml index 796f336..cfd2ce6 100644 --- a/apps/base/osint/ingester-deployment.yaml +++ b/apps/base/osint/ingester-deployment.yaml @@ -19,8 +19,22 @@ spec: - key: dedicated operator: Exists effect: PreferNoSchedule + affinity: + nodeAffinity: + # Prefer the amd64 worker (linode) for these stateless CPU loops so + # they stop drawing on the 15 W-powered ThinkPad. Preferred, not + # required: if linode is absent they still schedule on siriussec. + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - linode + # keeps these off the arm64 rpi (some of these images are amd64-only) nodeSelector: - kubernetes.io/hostname: siriussec + kubernetes.io/arch: amd64 containers: - name: ingester image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-915f6cbe25be diff --git a/apps/base/osint/nats-deployment.yaml b/apps/base/osint/nats-deployment.yaml index 772b076..52fe659 100644 --- a/apps/base/osint/nats-deployment.yaml +++ b/apps/base/osint/nats-deployment.yaml @@ -19,8 +19,22 @@ spec: - key: dedicated operator: Exists effect: PreferNoSchedule + affinity: + nodeAffinity: + # Prefer the amd64 worker (linode) for these stateless CPU loops so + # they stop drawing on the 15 W-powered ThinkPad. Preferred, not + # required: if linode is absent they still schedule on siriussec. + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - linode + # keeps these off the arm64 rpi (some of these images are amd64-only) nodeSelector: - kubernetes.io/hostname: siriussec + kubernetes.io/arch: amd64 containers: - name: nats image: forgejo.siriusdevops.com/sirius/nats:2.10 diff --git a/apps/base/osint/news-scraper-deployment.yaml b/apps/base/osint/news-scraper-deployment.yaml index c211ee8..22cfd07 100644 --- a/apps/base/osint/news-scraper-deployment.yaml +++ b/apps/base/osint/news-scraper-deployment.yaml @@ -19,8 +19,22 @@ spec: - key: dedicated operator: Exists effect: PreferNoSchedule + affinity: + nodeAffinity: + # Prefer the amd64 worker (linode) for these stateless CPU loops so + # they stop drawing on the 15 W-powered ThinkPad. Preferred, not + # required: if linode is absent they still schedule on siriussec. + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - linode + # keeps these off the arm64 rpi (some of these images are amd64-only) nodeSelector: - kubernetes.io/hostname: siriussec + kubernetes.io/arch: amd64 containers: - name: news-scraper image: forgejo.siriusdevops.com/sirius/osint-news-scraper:amd64-58f71f5b4520 diff --git a/apps/base/osint/news-summarizer-deployment.yaml b/apps/base/osint/news-summarizer-deployment.yaml index 163b6d0..647fdc8 100644 --- a/apps/base/osint/news-summarizer-deployment.yaml +++ b/apps/base/osint/news-summarizer-deployment.yaml @@ -19,8 +19,22 @@ spec: - key: dedicated operator: Exists effect: PreferNoSchedule + affinity: + nodeAffinity: + # Prefer the amd64 worker (linode) for these stateless CPU loops so + # they stop drawing on the 15 W-powered ThinkPad. Preferred, not + # required: if linode is absent they still schedule on siriussec. + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - linode + # keeps these off the arm64 rpi (some of these images are amd64-only) nodeSelector: - kubernetes.io/hostname: siriussec + kubernetes.io/arch: amd64 containers: - name: news-summarizer image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fe2b5df369d0 From c2cdc2d5c1807f73df504316c93e95e22d61110d Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 16:47:03 -0500 Subject: [PATCH 09/31] apps(osint): move osint-db onto a linode-local PVC osint-db (TimescaleDB+PostGIS) moves from siriussec's local-path PV to a new 15Gi local-path-linode claim restored from a pg_dump (44,120,765 bytes, sha256 d74afa6d...30da). The Deployment gets a required linode nodeAffinity plus an amd64 arch selector; the old osint-pgdata claim and its PV are left untouched so rollback is one revert of claimName + scheduling. --- apps/base/osint/kustomization.yaml | 1 + apps/base/osint/postgres-deployment.yaml | 16 ++++++++++++++-- apps/base/osint/postgres-pvc-linode.yaml | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 apps/base/osint/postgres-pvc-linode.yaml diff --git a/apps/base/osint/kustomization.yaml b/apps/base/osint/kustomization.yaml index e002a5c..02eb79c 100644 --- a/apps/base/osint/kustomization.yaml +++ b/apps/base/osint/kustomization.yaml @@ -4,6 +4,7 @@ resources: - namespace.yaml - configmap.yaml - postgres-pvc.yaml + - postgres-pvc-linode.yaml - postgres-deployment.yaml - postgres-service.yaml - nats-deployment.yaml diff --git a/apps/base/osint/postgres-deployment.yaml b/apps/base/osint/postgres-deployment.yaml index 936873b..2c84ab7 100644 --- a/apps/base/osint/postgres-deployment.yaml +++ b/apps/base/osint/postgres-deployment.yaml @@ -27,8 +27,20 @@ spec: - key: dedicated operator: Exists effect: PreferNoSchedule + # Local-path volume: the claim (osint-pgdata-linode) is pinned to linode by + # its PV, so the pod must be too. arch selector documents why: the image is + # amd64-only, as on every other node this can land on. nodeSelector: - kubernetes.io/hostname: siriussec + kubernetes.io/arch: amd64 + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - linode containers: - name: postgres image: forgejo.siriusdevops.com/sirius/osint-dashboard-pg:amd64-c48788d4b614-r2 @@ -79,4 +91,4 @@ spec: volumes: - name: pgdata persistentVolumeClaim: - claimName: osint-pgdata + claimName: osint-pgdata-linode diff --git a/apps/base/osint/postgres-pvc-linode.yaml b/apps/base/osint/postgres-pvc-linode.yaml new file mode 100644 index 0000000..a7dc02b --- /dev/null +++ b/apps/base/osint/postgres-pvc-linode.yaml @@ -0,0 +1,16 @@ +# Post-migration home for osint-db: a linode-local volume. +# Kept separate from postgres-pvc.yaml (osint-pgdata, on siriussec) so a +# rollback is one revert of the Deployment's claimName; the old claim and its +# PV stay untouched and Bound. +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: osint-pgdata-linode + namespace: osint +spec: + accessModes: + - ReadWriteOnce + storageClassName: local-path-linode + resources: + requests: + storage: 15Gi From e63c14641da49fcfea0d1de5b874b0a5bb593992 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 17:13:54 -0500 Subject: [PATCH 10/31] apps(osint): pg image r3 for timescaledb 2.32.1 on PG 16.16 PG 16.16 added the PortalDrop() "cannot drop portal" check that TimescaleDB <=2.32.0 trips from the background scheduler, so every policy job (refresh/compression/retention/job history) failed with SQLSTATE 24000 although CALL run_job() worked (timescale/timescaledb#11038, fixed in 2.32.1). Rebuilt apps/base/osint/pg-image/Dockerfile with: - base postgres:16.16-bookworm (was floating 16-bookworm) - timescaledb-2-postgresql-16 / -2-loader-postgresql-16 pinned to 2.32.1~debian12-1616 (built against PG 16.16) Pushed as amd64-c48788d4b614-r3 (digest sha256:b2bdc093...), verified by a throwaway restore of a fresh pg_dump: extension 2.32.0 -> ALTER EXTENSION UPDATE 2.32.1 -> all 12 jobs Success with real last_successful_finish and no portal errors. --- apps/base/osint/README.md | 16 +++++++++++++--- apps/base/osint/pg-image/Dockerfile | 23 ++++++++++++++++++----- apps/base/osint/postgres-deployment.yaml | 2 +- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/apps/base/osint/README.md b/apps/base/osint/README.md index eb44b51..a3f838d 100644 --- a/apps/base/osint/README.md +++ b/apps/base/osint/README.md @@ -8,7 +8,7 @@ instead of a host Docker container on the Pi. | Deployment | Image | Purpose | |---|---|---| -| `osint-db` | `forgejo…/sirius/osint-dashboard-pg:amd64-c48788d4b614-r2` | TimescaleDB 2 + PostGIS 3 on Postgres 16, `local-path` PVC `osint-pgdata` 15 Gi | +| `osint-db` | `forgejo…/sirius/osint-dashboard-pg:amd64-c48788d4b614-r3` | TimescaleDB 2.32.1 + PostGIS 3 on Postgres 16.16, `local-path-linode` PVC `osint-pgdata-linode` 15 Gi | | `osint-nats` | `forgejo…/sirius/nats:2.10` | JetStream event bus (`-js -m 8222`) | | `osint-app` | `forgejo…/sirius/osint-dashboard:amd64-915f6cbe25be` | FastAPI + static HUD; runs `alembic upgrade heads` on start; single-admin auth (`app/auth.py`) — public read-only site, admin-only keys/settings/mutations | | `osint-ingester` | same app image | RSS/GDELT/USGS/FIRMS/vessel ingest → NATS → Postgres | @@ -56,13 +56,23 @@ docker build -f pg-image/Dockerfile -t 127.0.0.1:3000/sirius/osint-das ``` `pg-image/Dockerfile` is the cluster copy of `Dockerfile.pg`. **It pins -`postgres:16-bookworm`**: the upstream file's bare `postgres:16` now resolves to -Debian trixie, whose `postgresql-16-postgis-3` (3.7.0+pgdg13) fails to load +`postgres:16.16-bookworm`**: the upstream file's bare `postgres:16` now resolves +to Debian trixie, whose `postgresql-16-postgis-3` (3.7.0+pgdg13) fails to load against PG 16.15 with `undefined symbol: heap_datum_check` — `CREATE EXTENSION postgis` crashes the server. On bookworm (`+pgdg12`) PostGIS 3.7 loads and `create_hypertable()` works. Port the one-line base-image pin upstream when the Pi stack is next rebuilt. +It also pins the TimescaleDB packages to `2.32.1~debian12-1616` (the `-1616` +suffix = built against PG 16.16) and the base image to the 16.16 minor. PG +16.16 added the `PortalDrop()` "cannot drop portal while it is being set up" +check that TimescaleDB <=2.32.0 trips in its background-worker path, so every +policy job failed with SQLSTATE 24000 while `CALL run_job()` worked +(timescale/timescaledb#11038, fixed in 2.31.2/2.32.1). Never unpin either half: +a pg minor bump without a matching TimescaleDB build reintroduces the failure. +`-r3` is that build. After a pod recreate the extension itself still has to be +moved: `ALTER EXTENSION timescaledb UPDATE TO '2.32.1'`. + ## Secrets (never in git) ```bash diff --git a/apps/base/osint/pg-image/Dockerfile b/apps/base/osint/pg-image/Dockerfile index faa014e..fa7acbc 100644 --- a/apps/base/osint/pg-image/Dockerfile +++ b/apps/base/osint/pg-image/Dockerfile @@ -1,19 +1,32 @@ # Cluster build of the OSINT Postgres image (amd64). # # Identical to `Dockerfile.pg` in sirius/osint-dashboard EXCEPT the base image -# is pinned to bookworm. The upstream `FROM postgres:16` now resolves to Debian -# trixie, where postgresql-16-postgis-3 (3.7.0+pgdg13) fails to load against -# PostgreSQL 16.15: +# is pinned to Debian bookworm AND to the 16.16 minor. The upstream file's bare +# `FROM postgres:16` now resolves to Debian trixie, where +# postgresql-16-postgis-3 (3.7.0+pgdg13) fails to load against PostgreSQL 16.15: # could not load library "/usr/lib/postgresql/16/lib/postgis-3.so": # undefined symbol: heap_datum_check # On bookworm (+pgdg12) both extensions load and create_hypertable() works. -FROM postgres:16-bookworm +# +# PostgreSQL minor and the TimescaleDB package build MUST match. TimescaleDB +# publishes one .so per PG minor (the packagecloud suffix `-1616` means built +# against 16.16). PostgreSQL 16.16/17.12/18.7 added the PortalDrop() "while it +# is being set up" check, which the <=2.32.0 background scheduler trips on, so +# every policy job fails with `cannot drop portal ""` (timescale#11038, fixed +# in 2.32.1). Both halves are pinned here so a rebuild cannot silently drift +# back onto a mismatched pair. +# +# Resulting versions: PostgreSQL 16.16, postgis 3.7.0, timescaledb 2.32.1. +# After a pod recreate run `ALTER EXTENSION timescaledb UPDATE TO '2.32.1'`. +FROM postgres:16.16-bookworm RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl gnupg lsb-release && \ curl -fsSL https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | bash && \ apt-get update && apt-get install -y --no-install-recommends \ - postgresql-16-postgis-3 timescaledb-2-postgresql-16 && \ + postgresql-16-postgis-3 \ + timescaledb-2-postgresql-16=2.32.1~debian12-1616 \ + timescaledb-2-loader-postgresql-16=2.32.1~debian12-1616 && \ mkdir -p /etc/postgresql/16/main/conf.d && \ echo "shared_preload_libraries = 'timescaledb'" > /etc/postgresql/16/main/conf.d/timescaledb.conf && \ rm -rf /var/lib/apt/lists/* diff --git a/apps/base/osint/postgres-deployment.yaml b/apps/base/osint/postgres-deployment.yaml index 2c84ab7..3f37a54 100644 --- a/apps/base/osint/postgres-deployment.yaml +++ b/apps/base/osint/postgres-deployment.yaml @@ -43,7 +43,7 @@ spec: - linode containers: - name: postgres - image: forgejo.siriusdevops.com/sirius/osint-dashboard-pg:amd64-c48788d4b614-r2 + image: forgejo.siriusdevops.com/sirius/osint-dashboard-pg:amd64-c48788d4b614-r3 imagePullPolicy: IfNotPresent args: - -c From f326735a8b37548313d52b366539025bafec3191 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 17:42:10 -0500 Subject: [PATCH 11/31] apps(osint): pin app to amd64-54897b49bc57 + ADS-B idle watch env osint-dashboard#68: the ADSB refresh loop persisted aircraft only for connected browser viewports, so aircraft_positions stalled whenever nobody had the map open. The new image sweeps the chokepoint presets while idle; this commit pins it and sets ADSB_REFRESH_INTERVAL/ADSB_WATCH_* explicitly instead of relying on app defaults. ingester/camera keep amd64-915f6cbe25be (no loop change there); pinning the ingester would restart it for nothing. --- apps/base/osint/app-deployment.yaml | 4 ++-- apps/base/osint/configmap.yaml | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/base/osint/app-deployment.yaml b/apps/base/osint/app-deployment.yaml index 93ebf7f..99acbc1 100644 --- a/apps/base/osint/app-deployment.yaml +++ b/apps/base/osint/app-deployment.yaml @@ -24,7 +24,7 @@ spec: initContainers: # Wait for Postgres before alembic runs (the entrypoint migrates). - name: wait-for-db - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-915f6cbe25be + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-54897b49bc57 imagePullPolicy: IfNotPresent command: - python @@ -42,7 +42,7 @@ spec: sys.exit("postgres did not become reachable in 300s") containers: - name: app - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-915f6cbe25be + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-54897b49bc57 imagePullPolicy: IfNotPresent ports: - containerPort: 8000 diff --git a/apps/base/osint/configmap.yaml b/apps/base/osint/configmap.yaml index bdc0e70..fa58991 100644 --- a/apps/base/osint/configmap.yaml +++ b/apps/base/osint/configmap.yaml @@ -36,6 +36,15 @@ data: VESSELAPI_IN_APP: "0" VESSELAPI_IN_INGEST: "1" + # ── ADS-B refresh (osint-app `_adsb_refresh_loop`) ────────────────────── + # The loop polls ADSB.lol for each connected browser viewport. With no tab + # open it used to persist nothing, and aircraft_positions stalled for a day + # (max(ts) frozen 2026-11-20 04:58 -> 2026-11-21) while USGS/news kept + # ingesting. While idle it now sweeps the chokepoint presets instead. + ADSB_REFRESH_INTERVAL: "8" + ADSB_WATCH_ENABLED: "1" + ADSB_WATCH_INTERVAL: "30" + # ── camera discovery service ──────────────────────────────────────────── CAMERA_SOURCE_URLS: "" CAMERA_SCRAPE_INTERVAL: "3600" From f0a82f85deac01e5fe105047bcaffb0d603926fb Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 17:58:33 -0500 Subject: [PATCH 12/31] apps(osint): set PGDATABASE=osint_data on osint-db deploy/osint-db logged 'FATAL: database "osint" does not exist' straight after it became ready (2026-11-21 22:15:15): any bare `psql -U osint` / `pg_dump -U osint` inside the pod defaults the database to the user name. PGDATABASE makes osint_data the default so ops commands cannot aim at a database that does not exist. Probes already pass -d osint_data. --- apps/base/osint/postgres-deployment.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/base/osint/postgres-deployment.yaml b/apps/base/osint/postgres-deployment.yaml index 3f37a54..dd4a051 100644 --- a/apps/base/osint/postgres-deployment.yaml +++ b/apps/base/osint/postgres-deployment.yaml @@ -60,6 +60,12 @@ spec: value: osint - name: POSTGRES_DB value: osint_data + # Bare `psql`/`pg_dump -U osint` inside this pod would otherwise + # default the database to the USER name and log + # `FATAL: database "osint" does not exist` (seen 2026-11-21 22:15 + # on deploy/osint-db). PGDATABASE makes the correct db the default. + - name: PGDATABASE + value: osint_data - name: PGDATA value: /var/lib/postgresql/data/pgdata - name: POSTGRES_PASSWORD From 1e9253c147c26bfdfa21cfb0f39218c6622e2afe Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 18:15:51 -0500 Subject: [PATCH 13/31] apps(osint): pin ingester to amd64-fc0cd41b7aa4 (GDELT 429 backoff) osint-dashboard#69: drop the pointless https->http retry on 429, add a doubling backoff (300s -> 1800s, Retry-After honoured) and log one line per cycle instead of a traceback. Ingester only; app/camera keep their tags. --- apps/base/osint/ingester-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/osint/ingester-deployment.yaml b/apps/base/osint/ingester-deployment.yaml index cfd2ce6..6b29c07 100644 --- a/apps/base/osint/ingester-deployment.yaml +++ b/apps/base/osint/ingester-deployment.yaml @@ -37,7 +37,7 @@ spec: kubernetes.io/arch: amd64 containers: - name: ingester - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-915f6cbe25be + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fc0cd41b7aa4 imagePullPolicy: IfNotPresent command: ["python", "app/run_ingester.py"] envFrom: From 0e5ba18377d15c6a0c25504a1b86d76b349bcc26 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 18:39:28 -0500 Subject: [PATCH 14/31] apps(osint): pin ingester to amd64-76035535bcb2 (GDELT 15-min GKG bulk ingest) --- apps/base/osint/ingester-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/osint/ingester-deployment.yaml b/apps/base/osint/ingester-deployment.yaml index 6b29c07..d0e8682 100644 --- a/apps/base/osint/ingester-deployment.yaml +++ b/apps/base/osint/ingester-deployment.yaml @@ -37,7 +37,7 @@ spec: kubernetes.io/arch: amd64 containers: - name: ingester - image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-fc0cd41b7aa4 + image: forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-76035535bcb2 imagePullPolicy: IfNotPresent command: ["python", "app/run_ingester.py"] envFrom: From 930752152e07e5c149cdadefa38f05bf7862c802 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sun, 22 Nov 2026 00:32:31 -0500 Subject: [PATCH 15/31] apps(metabase): deploy Metabase (WireGuard-only :8085) with CNPG app DB - apps/base/metabase: namespace, CNPG Cluster pg (5Gi local-path, siriussec), Metabase Deployment v0.65.6.3 (1.5G heap, no PVC), Service, hostname-less HTTPRoute on the dedicated metabase Gateway - infrastructure/networking/internal: new Gateway metabase on port 8085 (own RouteConfiguration, so it cannot merge with Grafana's bare route) - host firewall: 8085 in siriussec nft set + rpi ufw guard --- apps/base/metabase/cluster.yaml | 38 +++++++++ apps/base/metabase/deployment.yaml | 83 +++++++++++++++++++ apps/base/metabase/httproute.yaml | 25 ++++++ apps/base/metabase/kustomization.yaml | 10 +++ apps/base/metabase/namespace.yaml | 6 ++ apps/base/metabase/service.yaml | 14 ++++ apps/home/kustomization.yaml | 1 + .../networking/internal/gateway-metabase.yaml | 31 +++++++ .../internal/host-firewall/README.md | 7 +- .../internal-gw-firewall.service | 4 +- .../host-firewall/rpi-ufw-internal-gw.sh | 7 +- .../host-firewall/siriussec-internal-gw.nft | 12 +-- .../networking/internal/kustomization.yaml | 1 + 13 files changed, 225 insertions(+), 14 deletions(-) create mode 100644 apps/base/metabase/cluster.yaml create mode 100644 apps/base/metabase/deployment.yaml create mode 100644 apps/base/metabase/httproute.yaml create mode 100644 apps/base/metabase/kustomization.yaml create mode 100644 apps/base/metabase/namespace.yaml create mode 100644 apps/base/metabase/service.yaml create mode 100644 infrastructure/networking/internal/gateway-metabase.yaml diff --git a/apps/base/metabase/cluster.yaml b/apps/base/metabase/cluster.yaml new file mode 100644 index 0000000..18d404d --- /dev/null +++ b/apps/base/metabase/cluster.yaml @@ -0,0 +1,38 @@ +# Metabase's application database (its own metadata only: users, dashboards, +# questions, saved queries — never the data it queries). +# +# Same shape as every other CNPG cluster in this repo: one instance, local-path +# on siriussec, no superuser access. `bootstrap.initdb.secret` names the +# out-of-band Secret `metabase/pg-app` (kubernetes.io/basic-auth, username +# `metabase` — CNPG requires the secret's username to equal `owner`). The +# operator materialises `pg-app` with the same credentials for the Deployment. +# +# No barman ObjectStore yet: the other clusters get WAL archiving to Garage via +# the CNPG-I Barman Cloud plugin; this evaluation instance is deliberately left +# with no archive until Lance keeps it (follow-up card, not a silent gap). +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: pg + namespace: metabase +spec: + instances: 1 + imageName: ghcr.io/cloudnative-pg/postgresql:16 + storage: + size: 5Gi + storageClass: local-path + affinity: + nodeSelector: + kubernetes.io/hostname: siriussec + bootstrap: + initdb: + database: metabase + owner: metabase + secret: + name: pg-app + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + memory: 1Gi diff --git a/apps/base/metabase/deployment.yaml b/apps/base/metabase/deployment.yaml new file mode 100644 index 0000000..d7c6fd2 --- /dev/null +++ b/apps/base/metabase/deployment.yaml @@ -0,0 +1,83 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: metabase + namespace: metabase +spec: + replicas: 1 + selector: + matchLabels: + app: metabase + template: + metadata: + labels: + app: metabase + spec: + # Siriussec is the only gateway node (upstream Envoy has to reach the + # backend pod on the same node), and the CNPG primary is pinned here too. + nodeSelector: + kubernetes.io/hostname: siriussec + tolerations: + - key: dedicated + operator: Exists + effect: PreferNoSchedule + containers: + - name: metabase + # Pinned release tag (2026-11-20, multi-arch). Never latest/nightly: + # Metabase auto-migrates its app DB on start, so an unpinned tag turns + # a pod restart into a schema upgrade. + image: metabase/metabase:v0.65.6.3 + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 3000 + env: + # One JVM, 1.5 GiB heap, container limit 2 GiB. The laptop is on a + # marginal USB-C supply; a 2 GiB heap here is what starved it in the + # past (see references/laptop-node-power.md). + - name: JAVA_OPTS + value: "-Xmx1536m" + # All state lives in Postgres (no H2 file, no PVC), so the pod is + # disposable and `strategy: Recreate` is unnecessary. + - name: MB_DB_TYPE + value: postgres + - name: MB_DB_HOST + value: pg-rw.metabase.svc.cluster.local + - name: MB_DB_PORT + value: "5432" + - name: MB_DB_DBNAME + value: metabase + - name: MB_DB_USER + valueFrom: + secretKeyRef: + name: pg-app + key: username + - name: MB_DB_PASS + valueFrom: + secretKeyRef: + name: pg-app + key: password + readinessProbe: + httpGet: + path: /api/health + port: 3000 + # The JVM takes ~30-60 s to migrate/bootstrap its app DB. + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + livenessProbe: + httpGet: + path: /api/health + port: 3000 + initialDelaySeconds: 120 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 3 + resources: + requests: + cpu: 250m + memory: 1Gi + limits: + cpu: "2" + memory: 2Gi diff --git a/apps/base/metabase/httproute.yaml b/apps/base/metabase/httproute.yaml new file mode 100644 index 0000000..1ad119e --- /dev/null +++ b/apps/base/metabase/httproute.yaml @@ -0,0 +1,25 @@ +# Internal only, and deliberately HOSTNAME-LESS: it answers on the bare WireGuard +# address http://10.10.0.2:8085/ for every Host header. Phones cannot edit +# /etc/hosts, so a hostname would make the evaluation unusable on mobile. +# +# parentRefs is the dedicated `metabase` Gateway (infrastructure/networking/ +# internal/gateway-metabase.yaml), NOT the shared `internal` one: Cilium merges +# every hostname-less route of a Gateway into one weighted route, so sharing a +# Gateway with Grafana would serve both services on both ports at random. +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: metabase + namespace: metabase +spec: + parentRefs: + - name: metabase + namespace: internal + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: metabase + port: 3000 diff --git a/apps/base/metabase/kustomization.yaml b/apps/base/metabase/kustomization.yaml new file mode 100644 index 0000000..aaf2916 --- /dev/null +++ b/apps/base/metabase/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + # Secret metabase/pg-app (kubernetes.io/basic-auth) is created out of band + # before this Cluster applies — CNPG's initdb reads it. + - cluster.yaml + - deployment.yaml + - service.yaml + - httproute.yaml diff --git a/apps/base/metabase/namespace.yaml b/apps/base/metabase/namespace.yaml new file mode 100644 index 0000000..763c274 --- /dev/null +++ b/apps/base/metabase/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: metabase + labels: + app.kubernetes.io/part-of: metabase diff --git a/apps/base/metabase/service.yaml b/apps/base/metabase/service.yaml new file mode 100644 index 0000000..89f8d74 --- /dev/null +++ b/apps/base/metabase/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: metabase + namespace: metabase +spec: + type: ClusterIP + selector: + app: metabase + ports: + - name: http + port: 3000 + targetPort: 3000 + protocol: TCP diff --git a/apps/home/kustomization.yaml b/apps/home/kustomization.yaml index 1a08fad..18845da 100644 --- a/apps/home/kustomization.yaml +++ b/apps/home/kustomization.yaml @@ -6,3 +6,4 @@ resources: - ../base/piedmont - ../base/sirius-growth - ../base/osint + - ../base/metabase diff --git a/infrastructure/networking/internal/gateway-metabase.yaml b/infrastructure/networking/internal/gateway-metabase.yaml new file mode 100644 index 0000000..1eedd8b --- /dev/null +++ b/infrastructure/networking/internal/gateway-metabase.yaml @@ -0,0 +1,31 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: Gateway +metadata: + name: metabase + namespace: internal + labels: + dedicated: network + annotations: + # Why a second Gateway instead of a second listener on `internal`: + # Cilium renders one RouteConfiguration per Gateway shared by all its + # listeners, so a hostname-less route on any listener of `internal` would + # merge with Grafana's into one 50/50 weighted route. Its own Gateway gives + # it its own RouteConfiguration. + sirius.dev/purpose: bare-IP listener for Metabase (WireGuard only) +spec: + gatewayClassName: cilium + listeners: + - name: http-internal + protocol: HTTP + # PORT MUST BE FREE ON *EVERY* NODE THAT RUNS cilium-envoy (siriussec + # 10.10.0.2 is the only `gateway=true` node today). Cilium binds + # 0.0.0.0: hostNetwork, so a port held by anything else on a gateway + # node makes xDS reject the listener there ("cannot bind '0.0.0.0:': + # Address already in use") and restart-loops that node's Envoy — which + # fronts the public ingress. Verified free 2026-11-22: + # `ss -lntH "sport = :8085" | wc -l` = 0 on siriussec. + # 8080 (public), 8081 (Grafana), 8084 (Hubble UI) are taken. + port: 8085 + allowedRoutes: + namespaces: + from: All diff --git a/infrastructure/networking/internal/host-firewall/README.md b/infrastructure/networking/internal/host-firewall/README.md index b8a037b..e03fd2e 100644 --- a/infrastructure/networking/internal/host-firewall/README.md +++ b/infrastructure/networking/internal/host-firewall/README.md @@ -21,7 +21,8 @@ exactly one node. | siriussec (10.10.0.2) — **load bearing** | nftables table `inet internal_gw`, loaded by a oneshot unit (same pattern as `k8s-api-firewall.service`) | `siriussec-internal-gw.nft`, `internal-gw-firewall.service` | | rpi (10.10.0.1) — **inert guard** | ufw rules inserted above the `allow from 192.168.1.0/24` catch-all | `rpi-ufw-internal-gw.sh` | -Effective policy for `:8081` (Grafana) and `:8084` (Hubble UI): +Effective policy for `:8081` (Grafana), `:8084` (Hubble UI) and `:8085` +(Metabase): **accept from 10.10.0.0/24 and 10.244.0.0/16, accept on lo, drop everything else** (LAN, tailscale, public). Envoy binds every listener on `0.0.0.0`, so a new internal listener port is a LAN exposure until it is added here. The @@ -56,7 +57,7 @@ Verify: # the drop counter non-zero after a LAN request nft list table inet internal_gw # rpi -ufw status | grep -E '8081|8084' +ufw status | grep -E '8081|8084|8085' ``` Negative test from the LAN must be a timeout (DROP), never 200: @@ -70,4 +71,4 @@ When a new internal listener port is added, add it to the `tcp dport { … }` se in `siriussec-internal-gw.nft` and to `PORTS` in `rpi-ufw-internal-gw.sh` (which inserts one deny for the port plus mesh and pod-CIDR allows above the LAN catch-all), then reinstall both and re-run the two negative tests above with the -new port. +new port. \ No newline at end of file diff --git a/infrastructure/networking/internal/host-firewall/internal-gw-firewall.service b/infrastructure/networking/internal/host-firewall/internal-gw-firewall.service index 1d60425..c46890b 100644 --- a/infrastructure/networking/internal/host-firewall/internal-gw-firewall.service +++ b/infrastructure/networking/internal/host-firewall/internal-gw-firewall.service @@ -4,7 +4,7 @@ # Flux-managed); the file lives in git at # infrastructure/networking/internal/host-firewall/. [Unit] -Description=Restrict the internal Gateway listeners (8081, 8082) to WireGuard +Description=Restrict the internal Gateway listeners (8081, 8084, 8085) to WireGuard After=network-online.target Wants=network-online.target @@ -14,4 +14,4 @@ ExecStart=/usr/sbin/nft -f /etc/nftables.d/internal-gw.nft RemainAfterExit=yes [Install] -WantedBy=multi-user.target +WantedBy=multi-user.target \ No newline at end of file diff --git a/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh b/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh index 9c02418..fcbba69 100644 --- a/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh +++ b/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh @@ -6,14 +6,15 @@ # Final order per port: allow 10.10.0.0/24, allow 10.244.0.0/16, deny the rest. # # Ports: 8081 = Grafana (`internal` Gateway listener http-internal), -# 8084 = Hubble UI (`internal` Gateway listener hubble-ui). +# 8084 = Hubble UI (`internal` Gateway listener hubble-ui), +# 8085 = Metabase (`metabase` Gateway listener http-internal). # 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}" +PORTS="${PORTS:-8081 8084 8085}" for port in $PORTS; do if ufw status | grep -q "${port}/tcp"; then @@ -28,4 +29,4 @@ for port in $PORTS; do echo "$port rules installed:" ufw status | grep "${port}/tcp" || true -done +done \ No newline at end of file diff --git a/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft b/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft index 9f51db6..16a9801 100644 --- a/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft +++ b/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft @@ -1,6 +1,6 @@ #!/usr/sbin/nft -f -# Internal (WireGuard-only) gateway listeners: TCP 8081 (Grafana) and 8084 -# (Hubble UI). +# Internal (WireGuard-only) gateway listeners: TCP 8081 (Grafana), 8084 +# (Hubble UI) and 8085 (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 +22,13 @@ table inet internal_gw { type filter hook input priority filter; policy accept; # local process / kubelet probes - tcp dport { 8081, 8084 } iifname "lo" counter accept + tcp dport { 8081, 8084, 8085 } 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 } ip saddr { 10.10.0.0/24, 10.244.0.0/16 } counter accept + tcp dport { 8081, 8084, 8085 } ip saddr { 10.10.0.0/24, 10.244.0.0/16 } counter accept # everything else: LAN, tailscale, public - tcp dport { 8081, 8084 } counter drop + tcp dport { 8081, 8084, 8085 } counter drop } -} +} \ No newline at end of file diff --git a/infrastructure/networking/internal/kustomization.yaml b/infrastructure/networking/internal/kustomization.yaml index 60f44f2..d6d0f1e 100644 --- a/infrastructure/networking/internal/kustomization.yaml +++ b/infrastructure/networking/internal/kustomization.yaml @@ -4,3 +4,4 @@ resources: - namespace.yaml - gateway.yaml - gateway-hubble-ui.yaml + - gateway-metabase.yaml From 7f7f806616b5c885504ccf9322f365f4c500b461 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sun, 22 Nov 2026 02:15:56 -0500 Subject: [PATCH 16/31] 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. --- apps/base/farrisilk/httproute.yaml | 44 +++ apps/base/farrisilk/kustomization.yaml | 19 ++ apps/base/farrisilk/metabase.yaml | 106 +++++++ apps/base/farrisilk/namespace.yaml | 7 + apps/base/farrisilk/odoo-init.yaml | 164 +++++++++++ apps/base/farrisilk/odoo.yaml | 258 ++++++++++++++++++ apps/base/farrisilk/postgres-init.yaml | 67 +++++ apps/base/farrisilk/postgres.yaml | 140 ++++++++++ apps/home/kustomization.yaml | 1 + .../internal/gateway-farrisilk-metabase.yaml | 26 ++ .../internal/gateway-farrisilk-odoo.yaml | 31 +++ .../host-firewall/rpi-ufw-internal-gw.sh | 6 +- .../host-firewall/siriussec-internal-gw.nft | 9 +- .../networking/internal/kustomization.yaml | 2 + 14 files changed, 874 insertions(+), 6 deletions(-) create mode 100644 apps/base/farrisilk/httproute.yaml create mode 100644 apps/base/farrisilk/kustomization.yaml create mode 100644 apps/base/farrisilk/metabase.yaml create mode 100644 apps/base/farrisilk/namespace.yaml create mode 100644 apps/base/farrisilk/odoo-init.yaml create mode 100644 apps/base/farrisilk/odoo.yaml create mode 100644 apps/base/farrisilk/postgres-init.yaml create mode 100644 apps/base/farrisilk/postgres.yaml create mode 100644 infrastructure/networking/internal/gateway-farrisilk-metabase.yaml create mode 100644 infrastructure/networking/internal/gateway-farrisilk-odoo.yaml diff --git a/apps/base/farrisilk/httproute.yaml b/apps/base/farrisilk/httproute.yaml new file mode 100644 index 0000000..5c99157 --- /dev/null +++ b/apps/base/farrisilk/httproute.yaml @@ -0,0 +1,44 @@ +# Two separate HTTPRoutes and two separate Gateways, on purpose. +# +# A hostname-less route answers on the bare WireGuard address +# (http://10.10.0.2:8086/ and :8087/) for ANY Host header, because a phone +# cannot edit /etc/hosts. Cilium renders ONE RouteConfiguration per Gateway and +# merges every hostname-less route in it into a single weighted route, so two +# services sharing one Gateway serve each other's traffic at random regardless +# of listener port. Hence gateway-farrisilk-odoo.yaml (8086) and +# gateway-farrisilk-metabase.yaml (8087) in infrastructure/networking/internal/. +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: odoo + namespace: farrisilk +spec: + parentRefs: + - name: farrisilk-odoo + namespace: internal + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: odoo + port: 8069 +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: metabase + namespace: farrisilk +spec: + parentRefs: + - name: farrisilk-metabase + namespace: internal + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: metabase + port: 3000 diff --git a/apps/base/farrisilk/kustomization.yaml b/apps/base/farrisilk/kustomization.yaml new file mode 100644 index 0000000..5a9d57e --- /dev/null +++ b/apps/base/farrisilk/kustomization.yaml @@ -0,0 +1,19 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + # Secrets are created out of band, before this Kustomization applies: + # farrisilk/pg-app basic-auth, postgres superuser + # farrisilk/pg-users odoo/metabase/metabase_ro role passwords + # farrisilk/odoo-config admin_passwd (database master password) + # farrisilk/odoo-admin email, password (web admin login) + # farrisilk/metabase-admin email, password (Metabase's own login) + # farrisilk/metabase-data-source-creds username=metabase_ro + password + # farrisilk/metabase-secret-key MB_ENCRYPTION_SECRET_KEY + # None of them appear in git; they are not managed (or pruned) by Flux. + - postgres-init.yaml + - postgres.yaml + - odoo-init.yaml + - odoo.yaml + - metabase.yaml + - httproute.yaml diff --git a/apps/base/farrisilk/metabase.yaml b/apps/base/farrisilk/metabase.yaml new file mode 100644 index 0000000..4cc9330 --- /dev/null +++ b/apps/base/farrisilk/metabase.yaml @@ -0,0 +1,106 @@ +# Metabase for the lab replica — its own state in the SAME plain Postgres +# (database `metabase`), one data source: `farrisilk odoo` as `metabase_ro`. +# +# This is a SECOND instance next to the evaluation one in namespace `metabase`. +# The laptop is on a marginal USB-C supply, so it does not repeat that +# instance's 1.5 GiB heap: 1 GiB heap, 2 GiB container limit. +# +# MB_ENCRYPTION_SECRET_KEY is set here on purpose. Without it Metabase encrypts +# stored data-source passwords with a key derived from its own default, so a +# copy of the app DB is enough to read them. The key lives in Secret +# `farrisilk/metabase-secret-key` and must stay stable for the life of the app +# DB — rotating it makes every stored datasource password undecryptable. +apiVersion: apps/v1 +kind: Deployment +metadata: + name: metabase + namespace: farrisilk +spec: + replicas: 1 + selector: + matchLabels: + app: metabase + template: + metadata: + labels: + app: metabase + app.kubernetes.io/part-of: farrisilk + spec: + nodeSelector: + kubernetes.io/hostname: siriussec + tolerations: + - key: dedicated + operator: Exists + effect: PreferNoSchedule + containers: + - name: metabase + image: metabase/metabase:v0.65.6.3 + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 3000 + env: + - name: JAVA_OPTS + value: "-Xmx1024m" + - name: MB_DB_TYPE + value: postgres + - name: MB_DB_HOST + value: pg.farrisilk.svc.cluster.local + - name: MB_DB_PORT + value: "5432" + - name: MB_DB_DBNAME + value: metabase + - name: MB_DB_USER + value: metabase + - name: MB_DB_PASS + valueFrom: + secretKeyRef: + name: pg-users + key: metabase_password + - name: MB_ENCRYPTION_SECRET_KEY + valueFrom: + secretKeyRef: + name: metabase-secret-key + key: MB_ENCRYPTION_SECRET_KEY + - name: MB_JETTY_PORT + value: "3000" + - name: TZ + value: America/Los_Angeles + readinessProbe: + httpGet: + path: /api/health + port: http + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + livenessProbe: + httpGet: + path: /api/health + port: http + initialDelaySeconds: 120 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 3 + resources: + requests: + cpu: 250m + memory: 1Gi + limits: + cpu: "2" + memory: 2Gi +--- +apiVersion: v1 +kind: Service +metadata: + name: metabase + namespace: farrisilk +spec: + type: ClusterIP + selector: + app: metabase + ports: + - name: http + port: 3000 + targetPort: http + protocol: TCP diff --git a/apps/base/farrisilk/namespace.yaml b/apps/base/farrisilk/namespace.yaml new file mode 100644 index 0000000..d06ff54 --- /dev/null +++ b/apps/base/farrisilk/namespace.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: farrisilk + labels: + app.kubernetes.io/part-of: farrisilk + sirius.dev/purpose: lab-replica-of-client-stack diff --git a/apps/base/farrisilk/odoo-init.yaml b/apps/base/farrisilk/odoo-init.yaml new file mode 100644 index 0000000..2b64e84 --- /dev/null +++ b/apps/base/farrisilk/odoo-init.yaml @@ -0,0 +1,164 @@ +# Odoo provisioning, run as an initContainer on every pod start — idempotent by +# construction, so a restart never re-initialises a live database. +# +# 1. wait for Postgres +# 2. if the `farrisilk` database has no tables: `odoo -i base,web +# --without-demo=all --stop-after-init` (the "init once" step, done by the +# pod rather than by a separate Job so there is exactly one thing to wait +# on and no ordering race between a Job and the Deployment) +# 3. CREATE EXTENSION unaccent, as the database owner +# 4. (re)apply the read-only BI grants over every table Odoo just created, +# including revoking the tables that carry credentials +# 5. set the admin login/password from Secret `farrisilk/odoo-admin` +# +# Step 4 runs unconditionally, not only on first install: it is what picks up +# tables added by a later module install (`-i`/`-u` from /mnt/extra-addons), and +# `ALTER DEFAULT PRIVILEGES` alone does not cover tables created before the +# grant. Nothing here writes a credential to stdout. +apiVersion: v1 +kind: ConfigMap +metadata: + name: odoo-init + namespace: farrisilk +data: + init_db.py: | + #!/usr/bin/env python3 + """Idempotent first-run provisioning of the Farrisilk lab Odoo database.""" + import os + import subprocess + import sys + import time + + import psycopg2 + + HOST = os.environ["DB_HOST"] + PORT = int(os.environ.get("DB_PORT", "5432")) + SUPER_USER = os.environ["PG_SUPERUSER"] + SUPER_PW = os.environ["PG_SUPERPASS"] + DB = os.environ.get("ODOO_DB_NAME", "farrisilk") + CONF = "/etc/odoo-runtime/odoo.conf" + ADMIN_LOGIN = os.environ["ODOO_ADMIN_LOGIN"] + ADMIN_PASSWORD = os.environ["ODOO_ADMIN_PASSWORD"] + + # Tables that hold credentials looking like data. `ir_config_parameter` is + # the one the card calls out (API keys/tokens for integrations); the rest + # are the same class of column. `res_users` is deliberately NOT in this + # list: it carries a password *hash* only, and Metabase needs it for user + # counts. Everything found by inspection at runtime is added and logged. + CREDENTIAL_TABLES = [ + "ir_config_parameter", + "ir_mail_server", + "fetchmail_server", + "res_users_apikeys", + "payment_provider", + "res_users_identitycheck", + ] + + def connect(dbname, user, password): + conn = psycopg2.connect( + host=HOST, port=PORT, dbname=dbname, user=user, password=password, + connect_timeout=10, + ) + conn.autocommit = True + return conn + + def wait_for_pg(): + for _ in range(90): + try: + connect("postgres", SUPER_USER, SUPER_PW).close() + return + except psycopg2.Error: + time.sleep(2) + sys.exit("postgres unreachable") + + def tables(cur): + cur.execute( + "select table_name from information_schema.tables " + "where table_schema = 'public' and table_type = 'BASE TABLE'" + ) + return {r[0] for r in cur.fetchall()} + + def run(cmd, **kw): + print("+ " + " ".join(cmd), flush=True) + subprocess.run(cmd, check=True, **kw) + + wait_for_pg() + + conn = connect("postgres", SUPER_USER, SUPER_PW) + cur = conn.cursor() + cur.execute("select 1 from pg_database where datname = %s", (DB,)) + exists = cur.fetchone() is not None + conn.close() + + have_tables = False + if exists: + dconn = connect(DB, SUPER_USER, SUPER_PW) + dcur = dconn.cursor() + have_tables = bool(tables(dcur)) + dconn.close() + + if not have_tables: + print(f"== initialising {DB}: base,web (no demo data) ==", flush=True) + run(["odoo", "-c", CONF, "-d", DB, "-i", "base,web", + "--without-demo=all", "--stop-after-init", "--no-http"]) + else: + print(f"== {DB} already initialised: skipping -i base ==", flush=True) + + # unaccent as the database owner (trusted extension in PG16). Odoo uses it + # for accent-insensitive search in the web client. + oconn = connect(DB, "odoo", os.environ["ODOO_DB_PASSWORD"]) + ocur = oconn.cursor() + ocur.execute("CREATE EXTENSION IF NOT EXISTS unaccent") + ocur.execute("select extname, extowner::regrole::text from pg_extension where extname = 'unaccent'") + print("unaccent:", ocur.fetchone(), flush=True) + oconn.close() + + # Read-only BI grants + credential-table revokes. + gconn = connect(DB, SUPER_USER, SUPER_PW) + gcur = gconn.cursor() + gcur.execute("GRANT USAGE ON SCHEMA public TO metabase_ro") + gcur.execute("GRANT SELECT ON ALL TABLES IN SCHEMA public TO metabase_ro") + gcur.execute( + "ALTER DEFAULT PRIVILEGES FOR ROLE odoo IN SCHEMA public " + "GRANT SELECT ON TABLES TO metabase_ro" + ) + present = tables(gcur) + revoked = sorted({t for t in CREDENTIAL_TABLES if t in present}) + # Inspect rather than assume the static list is complete: anything whose + # columns look like credentials is added to the revoke set (logged below). + gcur.execute( + "select distinct table_name from information_schema.columns " + "where table_schema = 'public' and (" + " column_name ~ '(^|_)(password|secret|token)($|_)' or " + " column_name ~ '(api_key|access_key|private_key)'" + ") and table_name not in ('res_users', 'res_partner')" + ) + for (t,) in gcur.fetchall(): + if t in present and t not in revoked: + revoked.append(t) + revoked = sorted(revoked) + for t in revoked: + gcur.execute("REVOKE SELECT ON public.%s FROM metabase_ro" % t) + gcur.execute( + "select table_name from information_schema.table_privileges " + "where grantee = 'metabase_ro' and privilege_type = 'SELECT' " + "and table_schema = 'public' order by 1" + ) + readable = len(gcur.fetchall()) + gconn.close() + print(f"metabase_ro: SELECT granted on {readable} tables; " + f"revoked on {revoked}", flush=True) + + # Admin login/password from Secret farrisilk/odoo-admin. `odoo shell` is + # the supported way to set a res.users password without hand-rolling a + # pbkdf2 hash. Re-writing the same value on every start is harmless. + payload = ( + "u = env.ref('base.user_admin')\n" + f"u.write({{'login': {ADMIN_LOGIN!r}, 'password': {ADMIN_PASSWORD!r}}})\n" + "env.cr.commit()\n" + "print('admin uid', u.id, 'login', u.login)\n" + ) + run(["odoo", "shell", "-c", CONF, "-d", DB, "--no-http", + "--shell-interface=python"], input=payload, text=True) + + print("== provisioning complete ==", flush=True) diff --git a/apps/base/farrisilk/odoo.yaml b/apps/base/farrisilk/odoo.yaml new file mode 100644 index 0000000..2e89fcb --- /dev/null +++ b/apps/base/farrisilk/odoo.yaml @@ -0,0 +1,258 @@ +# Odoo 18 — the application half of the Farrisilk lab replica. +# +# Image is pinned to the DATED build, never `18.0`/`latest`: Odoo auto-migrates +# its database schema on start, so a floating tag turns a pod restart into an +# unplanned upgrade of a database you may be auditing. +# +# This image already ships wkhtmltopdf 0.12.6.1 (patched Qt) at +# /usr/local/bin/wkhtmltopdf, so PDF reports/ invoices render without a derived +# image. Verified 2026-11-22 — see README. +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: odoo-data + namespace: farrisilk +spec: + accessModes: [ReadWriteOnce] + storageClassName: local-path + resources: + requests: + storage: 10Gi +--- +# Empty by default. This is where the client's custom modules are copied in +# (`kubectl cp ./module farrisilk/:/mnt/extra-addons/...`), which is +# why it is a PVC and not an emptyDir: a module installed from here must survive +# a pod restart, or the modules table and the addons path disagree and Odoo +# refuses to start the affected modules. +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: odoo-extra-addons + namespace: farrisilk +spec: + accessModes: [ReadWriteOnce] + storageClassName: local-path + resources: + requests: + storage: 5Gi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: odoo + namespace: farrisilk +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: odoo + template: + metadata: + labels: + app: odoo + app.kubernetes.io/part-of: farrisilk + spec: + # Envoy has to reach the backend on the same node it serves from, and the + # filestore PVC is local-path (siriussec-only anyway). + nodeSelector: + kubernetes.io/hostname: siriussec + tolerations: + - key: dedicated + operator: Exists + effect: PreferNoSchedule + initContainers: + # Odoo has no env-var support for db_password, so the config file is + # rendered from the ConfigMap template + the Secret on every pod start + # into an emptyDir. Runs as root only to fix PVC ownership (the image + # user is uid 100 / gid 101 and local-path hands out root-owned dirs). + - name: render-config + image: odoo:18.0-20261112 + imagePullPolicy: IfNotPresent + securityContext: + runAsUser: 0 + command: + - /bin/sh + - -ec + - | + mkdir -p /mnt/extra-addons /var/lib/odoo /etc/odoo-runtime + chown -R 100:101 /var/lib/odoo /mnt/extra-addons + chmod 0755 /mnt/extra-addons + umask 077 + cat > /etc/odoo-runtime/odoo.conf < 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 diff --git a/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh b/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh index fcbba69..16dfe94 100644 --- a/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh +++ b/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh @@ -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 diff --git a/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft b/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft index 16a9801..046a53c 100644 --- a/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft +++ b/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft @@ -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 } } \ No newline at end of file diff --git a/infrastructure/networking/internal/kustomization.yaml b/infrastructure/networking/internal/kustomization.yaml index d6d0f1e..fc93e64 100644 --- a/infrastructure/networking/internal/kustomization.yaml +++ b/infrastructure/networking/internal/kustomization.yaml @@ -5,3 +5,5 @@ resources: - gateway.yaml - gateway-hubble-ui.yaml - gateway-metabase.yaml + - gateway-farrisilk-odoo.yaml + - gateway-farrisilk-metabase.yaml From 4891694f6f2db466c717073b5a4667f8cfd4a78d Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sun, 22 Nov 2026 02:25:09 -0500 Subject: [PATCH 17/31] apps(farrisilk): name Odoo's database `odoo` (align with the BI grants + Metabase source) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The card's build section names db `odoo` (owner odoo) and points Metabase at pg.../odoo, while its Odoo config line said db_name=farrisilk — the two cannot both hold. Aligned on `odoo`: db_name/dbfilter in odoo.conf and the init script's ODOO_DB_NAME. The renamed database kept its data (partner 7, product template 1, base+web+product installed). --- apps/base/farrisilk/odoo-init.yaml | 4 ++-- apps/base/farrisilk/odoo.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/base/farrisilk/odoo-init.yaml b/apps/base/farrisilk/odoo-init.yaml index 2b64e84..147202c 100644 --- a/apps/base/farrisilk/odoo-init.yaml +++ b/apps/base/farrisilk/odoo-init.yaml @@ -2,7 +2,7 @@ # construction, so a restart never re-initialises a live database. # # 1. wait for Postgres -# 2. if the `farrisilk` database has no tables: `odoo -i base,web +# 2. if the `odoo` database has no tables: `odoo -i base,web # --without-demo=all --stop-after-init` (the "init once" step, done by the # pod rather than by a separate Job so there is exactly one thing to wait # on and no ordering race between a Job and the Deployment) @@ -35,7 +35,7 @@ data: PORT = int(os.environ.get("DB_PORT", "5432")) SUPER_USER = os.environ["PG_SUPERUSER"] SUPER_PW = os.environ["PG_SUPERPASS"] - DB = os.environ.get("ODOO_DB_NAME", "farrisilk") + DB = os.environ.get("ODOO_DB_NAME", "odoo") CONF = "/etc/odoo-runtime/odoo.conf" ADMIN_LOGIN = os.environ["ODOO_ADMIN_LOGIN"] ADMIN_PASSWORD = os.environ["ODOO_ADMIN_PASSWORD"] diff --git a/apps/base/farrisilk/odoo.yaml b/apps/base/farrisilk/odoo.yaml index 2e89fcb..4c93f0f 100644 --- a/apps/base/farrisilk/odoo.yaml +++ b/apps/base/farrisilk/odoo.yaml @@ -88,10 +88,10 @@ spec: data_dir = /var/lib/odoo db_host = ${DB_HOST} db_port = ${DB_PORT} - db_name = farrisilk + db_name = odoo db_user = odoo db_password = ${ODOO_DB_PASSWORD} - dbfilter = ^farrisilk\$ + dbfilter = ^odoo\$ list_db = False proxy_mode = True workers = 0 @@ -138,7 +138,7 @@ spec: - name: DB_PORT value: "5432" - name: ODOO_DB_NAME - value: farrisilk + value: odoo - name: PG_SUPERUSER valueFrom: secretKeyRef: From f658bfabe977fb4ee4733349718dfbfc8d532d22 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sun, 22 Nov 2026 02:28:56 -0500 Subject: [PATCH 18/31] apps(farrisilk): close the metabase_ro schema-CREATE hole + README metabase_ro could create tables in public: default_transaction_read_only is a role default the role can lift (SET ... = off), and PG16 keeps CREATE on schema public for PUBLIC when the database was created by a non-superuser (Odoo creates its own). Revoke CREATE from PUBLIC and ALL from metabase_ro, grant USAGE only, in both the first-boot script and the per-start grant pass. README documents the stack, list_db/workers=0 rationale, module loading, filestore, the DB-only backup gap (filestore is not covered; follow-up t_8bdd3708) and the Shopify blank. --- apps/base/farrisilk/README.md | 278 +++++++++++++++++++++++++ apps/base/farrisilk/odoo-init.yaml | 8 + apps/base/farrisilk/postgres-init.yaml | 5 + 3 files changed, 291 insertions(+) create mode 100644 apps/base/farrisilk/README.md diff --git a/apps/base/farrisilk/README.md b/apps/base/farrisilk/README.md new file mode 100644 index 0000000..99bdc1d --- /dev/null +++ b/apps/base/farrisilk/README.md @@ -0,0 +1,278 @@ +# farrisilk — lab replica of the Farrisilk client stack + +A **development/audit sandbox** shaped like Farrisilk Inc.'s production stack — +not a copy of their traffic, and not their architecture. Odoo 18 + a plain +PostgreSQL + Metabase, WireGuard-only, in namespace `farrisilk`. + +| Service | URL over WireGuard | Bare IP? | Notes | +|---|---|---|---| +| Odoo 18 | `http://10.10.0.2:8086/` | yes, any `Host` | `http://10.10.0.2:8086/web/login` | +| Metabase | `http://10.10.0.2:8087/` | yes, any `Host` | secondary instance, 1 GiB heap | +| PostgreSQL | `pg.farrisilk.svc.cluster.local:5432` | in-cluster only | no NodePort, no gateway | + +`10.10.0.2` is siriussec, the only node labelled `gateway=true` (the only node +running `cilium-envoy`). Nothing here has a public hostname, a tunnel entry or a +DNS record — same posture as the `:8085` evaluation Metabase. + +## What is deliberately *not* like the homelab + +The client runs **Odoo 18 + PostgreSQL on two on-prem Proxmox VMs**, plus +Metabase and a Shopify integration containerised alongside. No Kubernetes. +This namespace is our sandbox for developing and auditing against *their* shape: + +- **Postgres is a plain container (`postgres:16`) on one `local-path` volume, + not a CloudNativePG Cluster.** No operator, no replicas, no WAL archive — + because the client's database is a bare VM install. Do not "improve" it into + CNPG; that would test an architecture they do not run. +- **Odoo runs `workers=0`** (see below), where production may run several. +- **One Postgres, two databases**: `odoo` (the Odoo database, owner and app role + `odoo`) and `metabase` (Metabase's own application DB, owner `metabase`). + +## Layout + +| Object | File | +|---|---| +| Namespace | `namespace.yaml` | +| `pg` Deployment + Service + `pg-data` PVC (10Gi) | `postgres.yaml` | +| First-boot roles/databases (`/docker-entrypoint-initdb.d`) | `postgres-init.yaml` | +| Odoo Deployment/Service, `odoo-data` (10Gi) + `odoo-extra-addons` (5Gi) PVCs | `odoo.yaml` | +| Idempotent Odoo provisioning script (initContainer) | `odoo-init.yaml` | +| Metabase Deployment + Service | `metabase.yaml` | +| Two hostname-less HTTPRoutes | `httproute.yaml` | + +Gateways live with the other internal listeners: +`infrastructure/networking/internal/gateway-farrisilk-odoo.yaml` (8086) and +`gateway-farrisilk-metabase.yaml` (8087). **Each bare-IP service gets its own +Gateway**: Cilium renders one RouteConfiguration per Gateway and merges every +hostname-less route inside it into a weighted route, so two services sharing a +Gateway answer for each other at random. The host firewall +(`infrastructure/networking/internal/host-firewall/`, nft on siriussec + ufw on +rpi) carries 8086/8087 and was installed *before* the Gateways were pushed, so +there was never a window where Envoy's `0.0.0.0` bind was open on the LAN. + +## First boot / how the database comes up + +The `odoo` Deployment's initContainers do all provisioning — there is no +separate Job to race against: + +1. `render-config` renders `/etc/odoo-runtime/odoo.conf` from the ConfigMap + values plus Secret `pg-users`, and fixes PVC ownership (uid 100 / gid 101). + Odoo has no env-var support for `db_password`, hence the rendering step. +2. `init-db` (script in `odoo-init.yaml`): + - waits for Postgres; + - **if the `odoo` database has no tables**, runs + `odoo -d odoo -i base,web --without-demo=all --stop-after-init`; + - `CREATE EXTENSION IF NOT EXISTS unaccent` as the database owner; + - (re)applies the read-only BI grants and credential-table revokes, every + start, so tables added by a later module install are covered too; + - sets the admin login/password from Secret `farrisilk/odoo-admin` via + `odoo shell`. + +Restarting the pod is safe and visibly idempotent: +`== odoo already initialised: skipping -i base ==`. + +Metabase's own tables are created by Metabase in database `metabase` on first +start; nothing pre-creates them. + +## Custom modules (the client has some) + +Copy the module directory into the `odoo-extra-addons` PVC, then install it +through the ORM: + +```bash +POD=$(kubectl -n farrisilk get pod -l app=odoo -o name | head -1) +kubectl -n farrisilk cp ./client_module "${POD#pod/}:/mnt/extra-addons/client_module" -c odoo +kubectl -n farrisilk exec -i deploy/odoo -c odoo -- \ + odoo shell -c /etc/odoo-runtime/odoo.conf -d odoo --no-http --shell-interface=python <<'EOF' +m = env['ir.module.module'].search([('name', '=', 'client_module')]) +m.button_immediate_install() +env.cr.commit() +print(m.state) +EOF +``` + +Then `kubectl -n farrisilk delete pod -l app=odoo` once, so `init-db` re-applies +the `metabase_ro` SELECT grants to the tables the module just created (grants +are re-applied on every pod start; `ALTER DEFAULT PRIVILEGES` covers tables +created after the grant but not before it). + +The PVC is why a module survives a restart: an installed module whose directory +disappears from `addons_path` makes Odoo refuse to load it. + +`/mnt/enterprise-addons` is an **emptyDir**, already on `addons_path` and +unused. Whether the client actually runs Enterprise is still an open question; +drop an EE addons tree there (or turn it into a PVC) only once that is answered. + +## `list_db=False`, and how to flip it + +`list_db = False` mirrors the client's production posture: the database manager +(`/web/database/manager`, database create/duplicate/drop) is not reachable from +a browser. `dbfilter = ^odoo$` pins the served database. + +For development work that needs the database manager (e.g. duplicating the DB +before a risky migration), change the `list_db` line in the `render-config` +script in `odoo.yaml` to `True`, push, let Flux roll the pod — do not +`kubectl exec`-edit the rendered config, it is re-rendered on every start. +Flip it back afterwards: with `list_db=True` and `proxy_mode=True` the manager +is reachable by anyone on the WireGuard mesh. + +## Why `workers=0` (and what production needs) + +`workers=0` runs Odoo as a single process (threaded). It is the honest setting +for a one-user lab replica on a laptop: multi-worker needs its own gevent/bus +port and much more RAM. + +**Production shape**: `workers = (2 × cores) + 1`, capped by available RAM at +roughly **512 MB per worker** (plus the 1.5 GiB hard limit for the main +process), with `max_cron_threads` counted separately. + +Going multi-worker here requires exposing the **gevent/bus port 8072** through +its own Gateway listener *and* its own host-firewall entry — a plain +`workers=N` without 8072 breaks longpolling/bus (the web client silently loses +notifications). 8072 is deliberately not opened while `workers=0`. + +## Filestore (where attachments actually live) + +`data_dir = /var/lib/odoo` on PVC `odoo-data`, so attachment bytes live at +`/var/lib/odoo/filestore/odoo/<2-char>/` inside the Odoo pod +(`ir_attachment.store_fname` = `<2-char>/`). Verified: an `ir.attachment` +created over XML-RPC appears as a 697-byte file at exactly that path. + +**The DB is not the filestore.** `ir_attachment` rows hold metadata; the bytes +are files. A database-only restore comes back looking healthy and every +attachment, image and rendered artefact is gone. + +## Backups — the gap, stated plainly + +There are **no backups of this stack in the cluster**, and none are being added +by this card. + +The client's practice is a **cron-driven `pg_dump` of the database only** — no +barman/PITR, no filestore copy. The replica mirrors that *shape*; the follow-up +card (`t_8bdd3708`) proves the failure mode deliberately rather than hiding it. +Two consequences to keep in mind while auditing: + +1. `pg_dump` of `odoo` + `metabase` reproduces Odoo's database and Metabase's + questions/dashboards. It does **not** reproduce `/var/lib/odoo/filestore`. +2. A DB-only restore therefore produces an Odoo instance where the attachment + list is intact and every download 404s. That is the client's real exposure + too, if their cron really copies only the DB. + +## PDF reports + +The pinned image (`odoo:18.0-20261112`) ships **`wkhtmltopdf 0.12.6.1 (with +patched qt)`** at `/usr/local/bin/wkhtmltopdf`, so no derived image is needed +and PDF rendering is not a gap here. Proven end-to-end over the gateway: +`GET /report/pdf/product.report_pricelist/1` → `200`, `application/pdf`, +16 032 bytes, 13 pages. + +If a future image drops wkhtmltopdf, the fix is a derived image +`FROM odoo:18.0-` installing the *patched-qt* build (the Debian +`wkhtmltopdf` package is not patched and renders headers/footers badly), built +`runs-on: docker-amd64` and pinned by tag in `odoo.yaml`. + +## Metabase (secondary instance) + +- Image `metabase/metabase:v0.65.6.3`, `JAVA_OPTS=-Xmx1024m`, container limit + 2 GiB — this is a *second* Metabase next to the `metabase` namespace + evaluation instance and does not repeat its 1.5 GiB heap on this laptop. +- State lives in the same Postgres, database `metabase`, user `metabase`. +- **`MB_ENCRYPTION_SECRET_KEY` is set** (Secret `farrisilk/metabase-secret-key`) + so stored data-source passwords are not encrypted with Metabase's default key. + Keep it stable: rotating it makes every stored datasource password + undecryptable. +- Set up entirely through the API (`/api/session/properties` → `POST /api/setup` + → `POST /api/session` → `POST /api/database` → `sync_schema`), one data source: + **`farrisilk odoo`** → `pg.farrisilk.svc.cluster.local:5432/odoo` as + `metabase_ro`. +- Metabase has no per-database "read-only" switch for PostgreSQL sources; the + read-only guarantee here is the **role**, which is stronger (see below). + +### The read-only BI role (practice, not shortcut) + +`metabase_ro` is created by `postgres-init.yaml` and re-secured by +`odoo-init.yaml` on every pod start: + +```sql +-- role-level defaults +ALTER ROLE metabase_ro SET default_transaction_read_only = on; +ALTER ROLE metabase_ro SET statement_timeout = '60s'; +ALTER ROLE metabase_ro SET idle_in_transaction_session_timeout = '60s'; +-- CONNECTION LIMIT 10 +-- database/schema +REVOKE CREATE ON SCHEMA public FROM PUBLIC; -- PG16 keeps PUBLIC=CREATE when +REVOKE ALL ON SCHEMA public FROM metabase_ro; -- the DB was made by a non-superuser +GRANT USAGE ON SCHEMA public TO metabase_ro; +GRANT SELECT ON ALL TABLES IN SCHEMA public TO metabase_ro; +ALTER DEFAULT PRIVILEGES FOR ROLE odoo IN SCHEMA public + GRANT SELECT ON TABLES TO metabase_ro; +``` + +Why the schema revokes matter: `default_transaction_read_only` is a role +*default*, and the role may lift it with `SET default_transaction_read_only = +off`. Without the revoke, `metabase_ro` could create tables in `public` +(observed on 2026-11-22 — this was a real gap, now closed). With it, a create +fails twice over: read-only transaction, and `permission denied for schema +public`. + +Credential-bearing tables are **revoked, not just unqueried**. The set is +computed at every start (a static list plus anything whose columns match +`password|secret|token|api_key|private_key`) and logged: + +``` +metabase_ro: SELECT granted on 224 tables; revoked on +['auth_totp_wizard','change_password_own','fetchmail_server','iap_account', + 'ir_attachment','ir_config_parameter','ir_mail_server','mail_guest', + 'res_config_settings','res_groups','res_users_apikeys','res_users_identitycheck'] +``` + +`ir_config_parameter` is the one that matters most (integration API keys and +tokens). `res_users` stays readable on purpose — it carries only a password +*hash* and Metabase needs it for user counts. + +## Secrets (out of band, in the cluster only) + +Created before the Kustomization applies; never in git, never printed: + +| Secret | Keys | Used by | +|---|---|---| +| `pg-app` | `username`=postgres, `password` | Postgres bootstrap superuser | +| `pg-users` | `odoo_password`, `metabase_password`, `metabase_ro_password` | role passwords (initdb + workloads) | +| `odoo-config` | `admin_passwd` | Odoo database master password | +| `odoo-admin` | `email`, `password` | Odoo web admin login (uid 2) | +| `metabase-admin` | `email`, `password` | Metabase's own login (**email**, no username) | +| `metabase-data-source-creds` | `username`=metabase_ro, `password` | the `farrisilk odoo` data source | +| `metabase-secret-key` | `MB_ENCRYPTION_SECRET_KEY` | Metabase at-rest encryption | + +## Shopify — integration surface only, blocked on client credentials + +Shopify is SaaS: **there is nothing to deploy in this cluster**, and this +namespace deliberately contains no stub service and no unauthenticated webhook +listener. What the replica needs before a connector can exist: + +1. **Store domain** (e.g. `.myshopify.com`) and the store's plan — Lance + has not seen the store. +2. **Admin API access token** with scopes for the resources the connector + syncs (products/orders/inventory read-write; webhooks write), created in the + store's custom-app settings. Stored as a Secret, never in git. +3. The **Odoo Shopify connector module** (the client has custom modules; the + QSIT/Shopify connector is a separate module) copied into + `/mnt/extra-addons` — see "Custom modules". +4. **Webhook path through the ingress.** Shopify must POST to a reachable + HTTPS URL. This namespace is WireGuard-only, so a webhook path needs a + public hostname + tunnel entry *and* HMAC verification — a decision that + must be made explicitly for the replica, not inherited from prod. + +Status: **blocked on client credentials** (store domain + Admin API token + +the connector module). Until then the Odoo side stays unconfigured on purpose. + +## Deviations from the card, recorded + +- The card's build section names db `odoo` (owner `odoo`), §4 grants on + database `odoo`, and Metabase's data source is `…:5432/odoo`, while the Odoo + config bullet said `db_name=farrisilk`. Those cannot both hold; the stack is + aligned on **`odoo`** (`db_name`, `dbfilter=^odoo$`, `ODOO_DB_NAME`, the BI + grants and the Metabase source all say `odoo`). +- `base,web` are installed (not `base` alone) so `/web/login` serves a real web + client. `product` was installed to create the acceptance product; a fresh + build installs `base,web` only. diff --git a/apps/base/farrisilk/odoo-init.yaml b/apps/base/farrisilk/odoo-init.yaml index 147202c..47cf718 100644 --- a/apps/base/farrisilk/odoo-init.yaml +++ b/apps/base/farrisilk/odoo-init.yaml @@ -116,6 +116,14 @@ data: # Read-only BI grants + credential-table revokes. gconn = connect(DB, SUPER_USER, SUPER_PW) gcur = gconn.cursor() + # PostgreSQL 16 leaves CREATE on schema public granted to PUBLIC in a + # database created by a NON-SUPERUSER (Odoo creates its own database as + # `odoo`), so `default_transaction_read_only` is the only thing stopping + # metabase_ro from creating tables — and a role may lift its own default + # with `SET default_transaction_read_only = off`. Privileges are the real + # guard: PUBLIC loses CREATE, metabase_ro gets USAGE only. + gcur.execute("REVOKE CREATE ON SCHEMA public FROM PUBLIC") + gcur.execute("REVOKE ALL ON SCHEMA public FROM metabase_ro") gcur.execute("GRANT USAGE ON SCHEMA public TO metabase_ro") gcur.execute("GRANT SELECT ON ALL TABLES IN SCHEMA public TO metabase_ro") gcur.execute( diff --git a/apps/base/farrisilk/postgres-init.yaml b/apps/base/farrisilk/postgres-init.yaml index ea4d5de..652de5e 100644 --- a/apps/base/farrisilk/postgres-init.yaml +++ b/apps/base/farrisilk/postgres-init.yaml @@ -61,6 +61,11 @@ data: # Schema-level setup in the (still empty) odoo database. Table grants and # the credential-table revokes are (re)applied by the odoo initContainer. psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname odoo <<'EOSQL' + -- Odoo creates the `odoo` role's tables later; PUBLIC must not keep CREATE + -- on the public schema (PG16 keeps it when the database was made by a + -- non-superuser), or the "read-only" BI role can create tables after + -- lifting its own default_transaction_read_only. + REVOKE CREATE ON SCHEMA public FROM PUBLIC; GRANT USAGE ON SCHEMA public TO metabase_ro; ALTER DEFAULT PRIVILEGES FOR ROLE odoo IN SCHEMA public GRANT SELECT ON TABLES TO metabase_ro; From 03fb50c3d7d3e62d02164f6876111830832dfefe Mon Sep 17 00:00:00 2001 From: devops Date: Sun, 22 Nov 2026 02:38:35 -0500 Subject: [PATCH 19/31] apps(farrisilk): client-shaped nightly pg_dump cron + 14d retention on a 10Gi PVC --- apps/base/farrisilk/backup.yaml | 169 +++++++++++++++++++++++++ apps/base/farrisilk/kustomization.yaml | 1 + 2 files changed, 170 insertions(+) create mode 100644 apps/base/farrisilk/backup.yaml diff --git a/apps/base/farrisilk/backup.yaml b/apps/base/farrisilk/backup.yaml new file mode 100644 index 0000000..2e2567c --- /dev/null +++ b/apps/base/farrisilk/backup.yaml @@ -0,0 +1,169 @@ +# Nightly logical backup of BOTH databases — the *standard shape* of the client's +# stated practice (bash script on cron that dumps the database). +# +# This is NOT a copy of the client's script: theirs has not been seen yet +# (Week 3 read-only audit item). It implements what Lance described — a nightly +# `pg_dump` per database, timestamped files, an age-based retention sweep and a +# per-run log line — and nothing more. +# +# Deliberately absent, because the client's method has none of it: +# - WAL archiving / PITR -> worst-case RPO is 24 h (see README) +# - filestore (attachment bytes)-> the dump carries rows, not files (see README) +# - off-box copy -> dumps live on siriussec's local-path disk +# (the Garage S3 API at http://10.10.0.1:3900 is reachable from a pod, but it +# needs a bucket + credentials that are not part of this namespace; copy is +# therefore NOT implemented and backups die with the node — on purpose, so +# the replica shows the real exposure.) +# +# No RBAC: the default ServiceAccount, with its token not even mounted. This pod +# talks to Postgres over the ClusterIP Service and writes to its own PVC. +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: backup-data + namespace: farrisilk + labels: + app.kubernetes.io/part-of: farrisilk +spec: + accessModes: [ReadWriteOnce] + storageClassName: local-path + resources: + requests: + storage: 10Gi +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: pg-backup-script + namespace: farrisilk + labels: + app.kubernetes.io/part-of: farrisilk +data: + backup.sh: | + #!/bin/sh + # Nightly pg_dump -Fc of each database + age-based retention. + # Exit non-zero if ANY dump fails or comes back with an empty TOC, so a + # broken backup turns the Job red instead of silently succeeding. + set -eu + : "${PGHOST:=pg}" + : "${PGPORT:=5432}" + : "${PGUSER:=postgres}" + : "${BACKUP_DIR:=/backups}" + : "${RETENTION_DAYS:=14}" + DATABASES="${DATABASES:-odoo metabase}" + + ts="$(date -u +%Y%m%dT%H%M%SZ)" + mkdir -p "$BACKUP_DIR" + run_start="$(date +%s)" + rc=0 + + echo "backup: run start ts=$ts databases='$DATABASES' retention=${RETENTION_DAYS}d dir=$BACKUP_DIR" + for db in $DATABASES; do + file="$BACKUP_DIR/$db-$ts.dump" + start="$(date +%s)" + if pg_dump -h "$PGHOST" -p "$PGPORT" -U "$PGUSER" -d "$db" -Fc -f "$file"; then + dur=$(( $(date +%s) - start )) + bytes="$(stat -c %s "$file")" + toc="$(pg_restore --list "$file" | wc -l)" + if [ "$toc" -gt 0 ]; then + echo "backup: ok db=$db file=$db-$ts.dump size=${bytes}B toc_entries=$toc duration=${dur}s" + else + echo "backup: FAIL db=$db file=$db-$ts.dump empty archive TOC" >&2 + rc=1 + fi + else + echo "backup: FAIL db=$db pg_dump did not complete" >&2 + rc=1 + fi + done + + echo "backup: retention sweep, deleting *.dump older than ${RETENTION_DAYS} days" + find "$BACKUP_DIR" -maxdepth 1 -type f -name '*.dump' -mtime +"$RETENTION_DAYS" -print -delete || rc=1 + + echo "backup: run complete rc=$rc total=$(( $(date +%s) - run_start ))s dumps_on_disk=$(ls -1 "$BACKUP_DIR"/*.dump 2>/dev/null | wc -l)" + exit "$rc" +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: pg-backup + namespace: farrisilk + labels: + app.kubernetes.io/part-of: farrisilk +spec: + # 03:17 America/Los_Angeles — one run per night, off the hour so it does not + # collide with Odoo's own cron threads or Metabase syncs at :00. + schedule: "17 3 * * *" + timeZone: America/Los_Angeles + concurrencyPolicy: Forbid + startingDeadlineSeconds: 600 + successfulJobsHistoryLimit: 3 + failedJobsHistoryLimit: 3 + jobTemplate: + spec: + backoffLimit: 1 + activeDeadlineSeconds: 1800 + template: + metadata: + labels: + app: pg-backup + app.kubernetes.io/part-of: farrisilk + spec: + restartPolicy: Never + automountServiceAccountToken: false + nodeSelector: + kubernetes.io/hostname: siriussec + tolerations: + - key: dedicated + operator: Exists + effect: PreferNoSchedule + # local-path hands out root-owned directories; the pod writes the PVC + # as root. It only runs pg_dump + pg_restore (client tools) and find. + securityContext: + runAsUser: 0 + runAsGroup: 0 + containers: + - name: pg-dump + image: postgres:16 + imagePullPolicy: IfNotPresent + command: ["/bin/sh", "/opt/backup/backup.sh"] + env: + - name: PGHOST + value: pg.farrisilk.svc.cluster.local + - name: PGPORT + value: "5432" + - name: PGUSER + valueFrom: + secretKeyRef: + name: pg-app + key: username + - name: PGPASSWORD + valueFrom: + secretKeyRef: + name: pg-app + key: password + - name: RETENTION_DAYS + value: "14" + - name: TZ + value: America/Los_Angeles + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + memory: 512Mi + volumeMounts: + - name: backups + mountPath: /backups + - name: script + mountPath: /opt/backup + readOnly: true + volumes: + - name: backups + persistentVolumeClaim: + claimName: backup-data + - name: script + configMap: + name: pg-backup-script + defaultMode: 0555 diff --git a/apps/base/farrisilk/kustomization.yaml b/apps/base/farrisilk/kustomization.yaml index 5a9d57e..ed462db 100644 --- a/apps/base/farrisilk/kustomization.yaml +++ b/apps/base/farrisilk/kustomization.yaml @@ -16,4 +16,5 @@ resources: - odoo-init.yaml - odoo.yaml - metabase.yaml + - backup.yaml - httproute.yaml From 96404c96e1bdbb4d192528bd728f0a6e3d9bc78a Mon Sep 17 00:00:00 2001 From: devops Date: Sun, 22 Nov 2026 02:43:17 -0500 Subject: [PATCH 20/31] apps(farrisilk): document backup schedule/restore/RPO + the filestore gap with measured evidence --- apps/base/farrisilk/README.md | 169 +++++++++++++++++++++++++++--- apps/base/farrisilk/postgres.yaml | 10 +- 2 files changed, 163 insertions(+), 16 deletions(-) diff --git a/apps/base/farrisilk/README.md b/apps/base/farrisilk/README.md index 99bdc1d..ae1fd3c 100644 --- a/apps/base/farrisilk/README.md +++ b/apps/base/farrisilk/README.md @@ -142,21 +142,166 @@ created over XML-RPC appears as a 697-byte file at exactly that path. are files. A database-only restore comes back looking healthy and every attachment, image and rendered artefact is gone. -## Backups — the gap, stated plainly +## Backups — the client's shape, implemented and measured -There are **no backups of this stack in the cluster**, and none are being added -by this card. +`backup.yaml` implements the **standard shape of the client's stated practice** +(a bash script on cron that dumps the database). It is *not* a copy of the +client's script — theirs has not been seen yet (Week 3 read-only audit item) — +and the label matters: everything below is what the *described* method does and +does not give you. -The client's practice is a **cron-driven `pg_dump` of the database only** — no -barman/PITR, no filestore copy. The replica mirrors that *shape*; the follow-up -card (`t_8bdd3708`) proves the failure mode deliberately rather than hiding it. -Two consequences to keep in mind while auditing: +### Schedule, retention, location -1. `pg_dump` of `odoo` + `metabase` reproduces Odoo's database and Metabase's - questions/dashboards. It does **not** reproduce `/var/lib/odoo/filestore`. -2. A DB-only restore therefore produces an Odoo instance where the attachment - list is intact and every download 404s. That is the client's real exposure - too, if their cron really copies only the DB. +| Item | Value | +|---|---| +| CronJob | `farrisilk/pg-backup` | +| Schedule | `17 3 * * *`, `timeZone: America/Los_Angeles` (nightly) | +| Guard rails | `concurrencyPolicy: Forbid`, `startingDeadlineSeconds: 600`, `backoffLimit: 1`, `activeDeadlineSeconds: 1800`, history 3 ok / 3 failed | +| Databases | `odoo` **and** `metabase`, one `pg_dump -Fc` each | +| Filename | `/backups/-.dump`, e.g. `odoo-20261122T074011Z.dump` | +| Retention | **14 days** (`RETENTION_DAYS=14`, `find /backups -name '*.dump' -mtime +14 -delete`) | +| Storage | PVC `backup-data`, 10 Gi, `local-path`, mounted at `/backups` | +| Script | ConfigMap `pg-backup-script` (`backup.sh`), no ServiceAccount/RBAC (default SA, token not mounted) | +| Credentials | `pg-app` Secret via env (`PGUSER`/`PGPASSWORD`) — never in git or in the manifest | + +Per-run log line (the only evidence a run happened; it lands in the Job pod log): + +``` +backup: ok db=odoo file=odoo-20261122T074011Z.dump size=2202025B toc_entries=4876 duration=1s +backup: ok db=metabase file=metabase-20261122T074011Z.dump size=1274779B toc_entries=2923 duration=0s +backup: retention sweep, deleting *.dump older than 14 days +backup: run complete rc=0 total=1s dumps_on_disk=2 +``` + +The script fails the Job (`rc=1`) if any `pg_dump` fails **or** if the archive +comes back with an empty TOC — a broken backup turns red instead of silently +succeeding, which a bare `pg_dump >> log 2>&1` cron does not do. + +**Where the dumps actually are:** `/opt/local-path-provisioner/pvc-8f164f6c-…_farrisilk_backup-data` +on **siriussec only**. `local-path` is node-local, so the backup dies with the +node. No off-box copy is implemented: the Garage S3 API at +`http://10.10.0.1:3900` is reachable from a pod, but it needs a bucket plus +credentials that are not part of this namespace, so it was not wired in one +pass. That absence is deliberate — it is the same absence in the client's +described setup. + +Trigger a run on demand (what the manual proof below did): + +```bash +kubectl -n farrisilk create job --from=cronjob/pg-backup pg-backup-manual-1 +kubectl -n farrisilk logs job/pg-backup-manual-1 +``` + +### Restore — it is TWO steps, and the second one is the one people forget + +**1. Database** (dumps live on the `backup-data` PVC; mount it in a throwaway pod +or exec where it is mounted): + +```bash +createdb -h pg -U postgres +pg_restore -h pg -U postgres -d /backups/odoo-.dump +psql -h pg -U postgres -d -tAc 'select count(*) from res_users' +``` + +Restoring into the same cluster works without extra flags because the `odoo` +role and the schema already exist; into a *different* cluster use +`--no-owner --no-privileges` (then re-assign ownership). `-Fc` archives are +also readable with `pg_restore --list` and can be inspected without touching a +database. + +**2. Filestore** — this backup does **not** contain it. Copy the attachment +bytes from the Odoo PVC by hand: + +```bash +# from the Odoo pod (uid 100): tar the filestore directory, not the DB +kubectl -n farrisilk exec deploy/odoo -- \ + tar czf - -C /var/lib/odoo filestore | gzip -d | tar xzf - -C +``` + +The directory name is the **database name**: `/var/lib/odoo/filestore/odoo`. +Restoring the dump into `odoo_restore_probe` makes Odoo look in +`/var/lib/odoo/filestore/odoo_restore_probe`, which does not exist — renaming or +copying the filestore tree to match the restored DB name is a required manual +step. + +### Proof from the 2026-11-22 run (numbers, not assertions) + +| Check | Result | +|---|---| +| Job | `pg-backup-manual-1` — `Complete 1/1`, pod `Completed` | +| odoo dump | 2,202,025 B, `pg_restore --list` = **4876** entries | +| metabase dump | 1,274,779 B, `pg_restore --list` = **2923** entries | +| Restore probe | `createdb odoo_restore_probe` → `pg_restore -d` → **rc 0** | +| Row counts | live `res_users`=**5** vs restored=**5**; live `ir_attachment`=**22** vs restored=**22** | +| Cleanup | `odoo_restore_probe` dropped; probe pods deleted | +| Retention sweep | 30-day-old `*.dump` deleted by the exact `find`, fresh file kept | + +### The gap this method carries — demonstrated, not asserted + +After the restore above, the database is complete and healthy. The attachments +are not: + +- Restored DB references **22** `ir_attachment` rows, **21** of them with a + `store_fname` (file bytes). +- The backup volume holds exactly **2** files: the two `.dump` archives. + **0 of the 21 referenced files** exist anywhere under `/backups` (checked + every `store_fname` against the volume). +- `pg_restore --list` contains **0** filestore/blob entries — the dump carries + rows, not bytes. +- The live filestore is **23 files / 732 KiB** under + `/var/lib/odoo/filestore/odoo`; none of it is in the backup. +- End-to-end: the same attachment id fetched from the **live** instance and from + a throwaway Odoo bound to the **restored** database: + + ``` + live /web/content/15 -> 200 25613B (res.partner 2, image_1024) + restored DB /web/content/15 -> 500 265B + live /web/content/22 -> 200 447998B (web assets bundle) + restored DB /web/content/22 -> 500 265B + ``` + + and the restored instance's log names the missing file exactly: + + ``` + FileNotFoundError: [Errno 2] No such file or directory: + '/var/lib/odoo/filestore/odoo_restore_probe/a3/a305c7712711bdddb2561500d8fcab0ead92ebd6' + ``` + +**User-visible consequence:** after a DB-only restore the database looks +perfectly healthy — users, invoices and records are all there — but every +invoice PDF, pricelist, product image and attachment download **404s or 500s**. +The client would discover this at the moment they need the backup, not before. + +### RPO / consistency statement + +- Nightly dump, **no WAL archiving, no PITR**: worst-case **RPO is 24 hours** of + orders, invoices and attachments. Anything written after 03:17 is gone. +- The dump is a single `pg_dump` per database and is **not point-in-time + consistent with the filestore**: files written while the dump runs are either + present on disk and absent from the DB, or referenced by the DB after the + dump snapshot but missing from any earlier filestore tar — even a correct + DB+filestore restore has a skew window. +- There is no automated restore test, no checksum/encryption, and no alert on a + failed cron run beyond the Job's own status. A silent `pg_dump` failure on a + cron is invisible until the day it is needed. + +### What the client's stated method does not cover (Week 3 remediation register) + +| # | Not covered | Impact | +|---|---|---| +| 1 | Filestore / attachment bytes | 22 attachment rows, 0 bytes restorable; all downloads/PDFs/images break after restore | +| 2 | WAL archiving / PITR | up to 24 h data loss; no restore to a point before a bad import/delete | +| 3 | Off-box copy | dumps sit on the same host as the database; host/disk/ransomware loss takes both | +| 4 | Restore testing | untested dumps are hypotheses; no evidence they restore | +| 5 | Point-in-time consistency DB↔filestore | skewed restores even when both are copied | +| 6 | Failure alerting/verification | a failed cron dump is silent; Job status is the only signal here | +| 7 | Encryption at rest / access control on dumps | plain `.dump` files readable by anyone with the volume | +| 8 | Retention policy enforcement beyond 14 d | unbounded growth or, if scripts differ, no policy at all | + +Closing these (barman/PITR, object storage, filestore tar+checksum, scheduled +restore drills) is an **architectural recommendation for the client**, not a +change to this replica — no CNPG/barman is added here on purpose: the replica +exists to reproduce the client's exposure. ## PDF reports diff --git a/apps/base/farrisilk/postgres.yaml b/apps/base/farrisilk/postgres.yaml index 8bbcae4..e74d693 100644 --- a/apps/base/farrisilk/postgres.yaml +++ b/apps/base/farrisilk/postgres.yaml @@ -6,10 +6,12 @@ # "improve" this into a CNPG Cluster: the point is to develop and audit against # the client's actual architecture, not ours. # -# Known gap (stated plainly on purpose): there are NO backups of this database. -# The client's practice is a cron-driven `pg_dump` of the DB only; that mirrors -# into a separate follow-up card for this namespace, and no PITR/barman story -# is being invented here. +# Backups: none at the database level — no WAL archive, no replica, no PITR. +# The client's practice (a cron-driven `pg_dump` of the DB only) is mirrored by +# `backup.yaml` in this directory: nightly logical dumps, 14-day retention, on a +# node-local PVC, with the filestore deliberately NOT covered. See README. +# Do not "improve" this into a CNPG Cluster: the point is to develop and audit +# against the client's actual architecture, not ours. apiVersion: v1 kind: PersistentVolumeClaim metadata: From 530320bbfeca1695761c344c613a085021612d4a Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sun, 22 Nov 2026 05:42:52 -0500 Subject: [PATCH 21/31] ops(siriussec): bound CPU bursts to the 15W power budget siriussec is a T480 on a 5V/3A (15W) USB-C supply and died 2026-11-22 04:20 after ~12h on battery. Host PL1 was 25W with turbo on, so any sustained burst outran the adapter. Cap the two workload-side bursts that can pin cores: - forgejo-runner-amd64 dind: no CPU limit before -> add cpu: 3 - metabase + farrisilk metabase: cpu limit 2 -> 1 each (two JVMs = 4 threads) Host-side cap (PL1 12W/PL2 15W, no_turbo=1) is applied by cpu-power-cap.service on the node itself, not by this repo. --- apps/base/farrisilk/metabase.yaml | 3 ++- apps/base/forgejo/runner-amd64.yaml | 5 +++++ apps/base/metabase/deployment.yaml | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/base/farrisilk/metabase.yaml b/apps/base/farrisilk/metabase.yaml index 4cc9330..b8653e2 100644 --- a/apps/base/farrisilk/metabase.yaml +++ b/apps/base/farrisilk/metabase.yaml @@ -87,7 +87,8 @@ spec: cpu: 250m memory: 1Gi limits: - cpu: "2" + # Capped with the main Metabase: see apps/base/metabase/deployment.yaml + cpu: "1" memory: 2Gi --- apiVersion: v1 diff --git a/apps/base/forgejo/runner-amd64.yaml b/apps/base/forgejo/runner-amd64.yaml index 7fa6dba..459971e 100644 --- a/apps/base/forgejo/runner-amd64.yaml +++ b/apps/base/forgejo/runner-amd64.yaml @@ -117,6 +117,11 @@ spec: cpu: 200m memory: 512Mi limits: + # Hard ceiling on CI burst draw: siriussec is a laptop on a 15 W + # USB-C supply, and dind previously had no CPU limit, so one + # Android/x86_64 build could pin all 8 threads (~25 W package) + # and drain the battery faster than the adapter refills it. + cpu: 3 memory: 4Gi - name: runner image: code.forgejo.org/forgejo/runner:5.0.1 diff --git a/apps/base/metabase/deployment.yaml b/apps/base/metabase/deployment.yaml index d7c6fd2..2536dc6 100644 --- a/apps/base/metabase/deployment.yaml +++ b/apps/base/metabase/deployment.yaml @@ -79,5 +79,9 @@ spec: cpu: 250m memory: 1Gi limits: - cpu: "2" + # 2 → 1: two Metabase JVMs on the gateway node could together + # burst to 4 threads on a 15 W adapter. 1 core each keeps the + # node inside its power budget; UI latency is unaffected at this + # query volume. + cpu: "1" memory: 2Gi From 79206e0487a7c6eecbd29c42973a724e2d6d5303 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sun, 22 Nov 2026 05:54:53 -0500 Subject: [PATCH 22/31] ops(farrisilk): park the client replica stack to cut siriussec draw siriussec is on a 15 W USB-C adapter and low-battery-shutdown fired 2026-11-22 04:20. The farrisilk replica (Odoo + Metabase JVM + Postgres) is the largest single stack on that node and is not client production. Scale its three Deployments to 0 and suspend the nightly pg_dump; PVCs and data stay put. Restore: set replicas back to 1 in odoo.yaml, metabase.yaml, postgres.yaml and unsuspend backup.yaml, then let Flux reconcile. --- apps/base/farrisilk/backup.yaml | 2 ++ apps/base/farrisilk/metabase.yaml | 3 ++- apps/base/farrisilk/odoo.yaml | 5 ++++- apps/base/farrisilk/postgres.yaml | 5 +++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/base/farrisilk/backup.yaml b/apps/base/farrisilk/backup.yaml index 2e2567c..2e5e13a 100644 --- a/apps/base/farrisilk/backup.yaml +++ b/apps/base/farrisilk/backup.yaml @@ -92,6 +92,8 @@ metadata: labels: app.kubernetes.io/part-of: farrisilk spec: + # Parked with the stack (see odoo.yaml): no dumps while Postgres is at 0. + suspend: true # 03:17 America/Los_Angeles — one run per night, off the hour so it does not # collide with Odoo's own cron threads or Metabase syncs at :00. schedule: "17 3 * * *" diff --git a/apps/base/farrisilk/metabase.yaml b/apps/base/farrisilk/metabase.yaml index b8653e2..1c215a4 100644 --- a/apps/base/farrisilk/metabase.yaml +++ b/apps/base/farrisilk/metabase.yaml @@ -16,7 +16,8 @@ metadata: name: metabase namespace: farrisilk spec: - replicas: 1 + # Parked 2026-11-22 (power budget) — see apps/base/farrisilk/odoo.yaml. + replicas: 0 selector: matchLabels: app: metabase diff --git a/apps/base/farrisilk/odoo.yaml b/apps/base/farrisilk/odoo.yaml index 4c93f0f..859b17d 100644 --- a/apps/base/farrisilk/odoo.yaml +++ b/apps/base/farrisilk/odoo.yaml @@ -43,7 +43,10 @@ metadata: name: odoo namespace: farrisilk spec: - replicas: 1 + # Parked 2026-11-22: siriussec's 15 W adapter cannot carry this replica + # stack (Odoo + two JVM/Postgres processes) alongside the public gateway + # workloads. Set back to 1 to bring the client replica up; PVCs are kept. + replicas: 0 strategy: type: Recreate selector: diff --git a/apps/base/farrisilk/postgres.yaml b/apps/base/farrisilk/postgres.yaml index e74d693..c2710a2 100644 --- a/apps/base/farrisilk/postgres.yaml +++ b/apps/base/farrisilk/postgres.yaml @@ -30,8 +30,9 @@ metadata: name: pg namespace: farrisilk spec: - replicas: 1 - # RWO volume: two pods must never hold the data directory at once. + # Parked 2026-11-22 (power budget) — see apps/base/farrisilk/odoo.yaml. + # Recreate: the data directory must be released before anything restarts. + replicas: 0 strategy: type: Recreate selector: From 01db28dec5ccdd1254924fb7624d1e4b527177c7 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Mon, 23 Nov 2026 22:50:52 -0500 Subject: [PATCH 23/31] apps(forgejo): serve a declarative robots.txt that keeps non-portfolio paths out of the index Self-registration was open until 2026-11-20 and Google indexed spam profiles under forgejo.siriusdevops.com (/leonabrewton8, /charlinebrando, .../-/packages). The accounts are deleted and 404 now, but Forgejo's built-in robots.txt only blocks /explore/*?* and /user/, so /explore/repos and /search stay crawlable. Forgejo serves GITEA_CUSTOM=/data/gitea/public/robots.txt at /robots.txt, so mount a ConfigMap there (the supported custom-public override) and disallow /explore/*, /user/*, /search*, /api/*, /*/-/packages while allowing /sirius/* for the portfolio repos. --- apps/base/forgejo/custom-public.yaml | 32 ++++++++++++++++++++++++++++ apps/base/forgejo/deployment.yaml | 8 +++++++ apps/base/forgejo/kustomization.yaml | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 apps/base/forgejo/custom-public.yaml diff --git a/apps/base/forgejo/custom-public.yaml b/apps/base/forgejo/custom-public.yaml new file mode 100644 index 0000000..ee4232a --- /dev/null +++ b/apps/base/forgejo/custom-public.yaml @@ -0,0 +1,32 @@ +# Custom "public" assets served at the site root by Forgejo. +# +# GITEA_CUSTOM in the image is /data/gitea, so Forgejo serves +# /data/gitea/public/* at the root path. Mounting this ConfigMap there makes +# /robots.txt declarative instead of a hand-written file on the PVC +# (docs: forgejo.org/docs/latest/admin/advanced/search-engines-indexation). +# +# Why: self-registration was open until 2026-11-20 and spam profiles +# (/leonabrewton8, /charlinebrando, .../-/packages) were indexed by Google. +# The accounts are gone, but Forgejo's built-in robots.txt only disallows +# /explore/*?* (query strings) and /user/, leaving /explore/repos and +# /search crawlable. This keeps the owner's portfolio repos (/sirius/*) +# indexable and everything else out. +apiVersion: v1 +kind: ConfigMap +metadata: + name: forgejo-custom-public + namespace: forgejo +data: + robots.txt: | + # forgejo.siriusdevops.com + User-agent: * + Disallow: /explore/* + Disallow: /user/* + Disallow: /search* + Disallow: /api/* + Disallow: /*/-/packages + Disallow: /repo/create + Disallow: /repo/migrate + Disallow: /org/create + + Allow: /sirius/* diff --git a/apps/base/forgejo/deployment.yaml b/apps/base/forgejo/deployment.yaml index 4a430ea..1a6c467 100644 --- a/apps/base/forgejo/deployment.yaml +++ b/apps/base/forgejo/deployment.yaml @@ -61,6 +61,11 @@ spec: volumeMounts: - name: data mountPath: /data + # Custom site-root assets (robots.txt). GITEA_CUSTOM=/data/gitea, + # so Forgejo serves /data/gitea/public/robots.txt at /robots.txt. + - name: custom-public + mountPath: /data/gitea/public + readOnly: true readinessProbe: httpGet: path: / @@ -77,3 +82,6 @@ spec: - name: data persistentVolumeClaim: claimName: forgejo-data + - name: custom-public + configMap: + name: forgejo-custom-public diff --git a/apps/base/forgejo/kustomization.yaml b/apps/base/forgejo/kustomization.yaml index 709c518..4c69535 100644 --- a/apps/base/forgejo/kustomization.yaml +++ b/apps/base/forgejo/kustomization.yaml @@ -7,6 +7,8 @@ resources: - cluster.yaml - podmonitor.yaml - pg-actions-queries.yaml + # Site-root custom assets (robots.txt) mounted into the forgejo pod. + - custom-public.yaml - deployment.yaml - service.yaml - runner-configmap.yaml From 82f0d8324368d0c3bef82e36f18f67339086c0fc Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Mon, 23 Nov 2026 22:54:10 -0500 Subject: [PATCH 24/31] =?UTF-8?q?apps(siriusdevops):=20pin=20site=20to=20e?= =?UTF-8?q?2fd76a=20=E2=80=94=20/book=20drops=20the=20public=20audit=20pri?= =?UTF-8?q?ce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit siriusdevops-site:e2fd76ad (merge of PR #19) replaces the $750–$1,500 audit anchor in the /book funnel with 'scoped and quoted after the review'. contact-api is unchanged at 8642f1a. --- apps/base/siriusdevops/deployment-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-site.yaml b/apps/base/siriusdevops/deployment-site.yaml index 5be80b1..7732245 100644 --- a/apps/base/siriusdevops/deployment-site.yaml +++ b/apps/base/siriusdevops/deployment-site.yaml @@ -75,7 +75,7 @@ spec: memory: 128Mi containers: - name: nginx - image: forgejo.siriusdevops.com/sirius/siriusdevops-site:799afe40192182cd418652a638376f06e3b1adeb + image: forgejo.siriusdevops.com/sirius/siriusdevops-site:e2fd76ad1dfeb6c758974f04a9b3d3308c78d43d imagePullPolicy: IfNotPresent ports: - containerPort: 80 From 648516af71ac54fba857c900e116d11f9fc63f40 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Mon, 23 Nov 2026 23:09:23 -0500 Subject: [PATCH 25/31] =?UTF-8?q?apps(siriusdevops):=20pin=20site=20to=20a?= =?UTF-8?q?f139906=20=E2=80=94=20five-band=20homepage=20repositioning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/siriusdevops/deployment-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-site.yaml b/apps/base/siriusdevops/deployment-site.yaml index 7732245..4ccecfd 100644 --- a/apps/base/siriusdevops/deployment-site.yaml +++ b/apps/base/siriusdevops/deployment-site.yaml @@ -75,7 +75,7 @@ spec: memory: 128Mi containers: - name: nginx - image: forgejo.siriusdevops.com/sirius/siriusdevops-site:e2fd76ad1dfeb6c758974f04a9b3d3308c78d43d + image: forgejo.siriusdevops.com/sirius/siriusdevops-site:af139906411167a382f072184cce526a82729083 imagePullPolicy: IfNotPresent ports: - containerPort: 80 From cc50d1c231cdf860c1471e59fa65adbe2db0735d Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Mon, 23 Nov 2026 23:28:27 -0500 Subject: [PATCH 26/31] =?UTF-8?q?apps(siriusdevops):=20pin=20site=20to=20f?= =?UTF-8?q?e2d5bb=20=E2=80=94=20Quiet=20Precision=20token=20pass?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/siriusdevops/deployment-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-site.yaml b/apps/base/siriusdevops/deployment-site.yaml index 4ccecfd..fdac4e4 100644 --- a/apps/base/siriusdevops/deployment-site.yaml +++ b/apps/base/siriusdevops/deployment-site.yaml @@ -75,7 +75,7 @@ spec: memory: 128Mi containers: - name: nginx - image: forgejo.siriusdevops.com/sirius/siriusdevops-site:af139906411167a382f072184cce526a82729083 + image: forgejo.siriusdevops.com/sirius/siriusdevops-site:fe2d5bbda956f66f8de6918a48d5c3e2952053ff imagePullPolicy: IfNotPresent ports: - containerPort: 80 From 5b26ecd8235e0b9d42a8418d1a0a4c69f52db97e Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Mon, 23 Nov 2026 23:43:30 -0500 Subject: [PATCH 27/31] =?UTF-8?q?apps(siriusdevops):=20pin=20site=20to=200?= =?UTF-8?q?e91b466=20=E2=80=94=20/lab=20briefs=20rewrite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/siriusdevops/deployment-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-site.yaml b/apps/base/siriusdevops/deployment-site.yaml index fdac4e4..fa0a0e0 100644 --- a/apps/base/siriusdevops/deployment-site.yaml +++ b/apps/base/siriusdevops/deployment-site.yaml @@ -75,7 +75,7 @@ spec: memory: 128Mi containers: - name: nginx - image: forgejo.siriusdevops.com/sirius/siriusdevops-site:fe2d5bbda956f66f8de6918a48d5c3e2952053ff + image: forgejo.siriusdevops.com/sirius/siriusdevops-site:0e91b466e2e07edf73f456dcab240fcf397ad5ce imagePullPolicy: IfNotPresent ports: - containerPort: 80 From 955f886d3616e54b8e5e8238f4e878a96aabcebc Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Tue, 24 Nov 2026 00:02:35 -0500 Subject: [PATCH 28/31] =?UTF-8?q?apps(siriusdevops):=20pin=20site=20to=203?= =?UTF-8?q?98b5353=20=E2=80=94=20homepage=20sheet=20roles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/siriusdevops/deployment-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-site.yaml b/apps/base/siriusdevops/deployment-site.yaml index fa0a0e0..8c94499 100644 --- a/apps/base/siriusdevops/deployment-site.yaml +++ b/apps/base/siriusdevops/deployment-site.yaml @@ -75,7 +75,7 @@ spec: memory: 128Mi containers: - name: nginx - image: forgejo.siriusdevops.com/sirius/siriusdevops-site:0e91b466e2e07edf73f456dcab240fcf397ad5ce + image: forgejo.siriusdevops.com/sirius/siriusdevops-site:398b5353f2cb24547f946d6bd306d7f3634ec671 imagePullPolicy: IfNotPresent ports: - containerPort: 80 From f5cb4ec22aaded4dd467e7350ee6593d173a9e62 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Tue, 24 Nov 2026 00:09:28 -0500 Subject: [PATCH 29/31] =?UTF-8?q?apps(siriusdevops):=20pin=20site=20to=200?= =?UTF-8?q?4b36fed=20=E2=80=94=20telemetry=207=20/=207=20Flux=20Kustomizat?= =?UTF-8?q?ions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/siriusdevops/deployment-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-site.yaml b/apps/base/siriusdevops/deployment-site.yaml index 8c94499..7d5077d 100644 --- a/apps/base/siriusdevops/deployment-site.yaml +++ b/apps/base/siriusdevops/deployment-site.yaml @@ -75,7 +75,7 @@ spec: memory: 128Mi containers: - name: nginx - image: forgejo.siriusdevops.com/sirius/siriusdevops-site:398b5353f2cb24547f946d6bd306d7f3634ec671 + image: forgejo.siriusdevops.com/sirius/siriusdevops-site:04b36fedf47e53f9d2b8bb59958faf90ebb3d9b8 imagePullPolicy: IfNotPresent ports: - containerPort: 80 From f9888c63f06d2879addee2f36a60b069f234ddd0 Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Tue, 24 Nov 2026 00:20:02 -0500 Subject: [PATCH 30/31] =?UTF-8?q?apps(siriusdevops):=20pin=20site=20to=203?= =?UTF-8?q?99c421f=20=E2=80=94=20zero=20em=20dashes=20on=20/,=20/book,=20/?= =?UTF-8?q?lab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/siriusdevops/deployment-site.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base/siriusdevops/deployment-site.yaml b/apps/base/siriusdevops/deployment-site.yaml index 7d5077d..67f1fe5 100644 --- a/apps/base/siriusdevops/deployment-site.yaml +++ b/apps/base/siriusdevops/deployment-site.yaml @@ -75,7 +75,7 @@ spec: memory: 128Mi containers: - name: nginx - image: forgejo.siriusdevops.com/sirius/siriusdevops-site:04b36fedf47e53f9d2b8bb59958faf90ebb3d9b8 + image: forgejo.siriusdevops.com/sirius/siriusdevops-site:399c421f51a2fd74a87e810641226d58e4e22690 imagePullPolicy: IfNotPresent ports: - containerPort: 80 From ae22aab3303531a40a5aa030420727e8d7f263da Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Tue, 24 Nov 2026 01:46:25 -0500 Subject: [PATCH 31/31] =?UTF-8?q?apps(customer1):=20anonymize=20client=20n?= =?UTF-8?q?ame=20=E2=80=94=20farrisilk=20->=20customer1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename the client-shaped lab replica namespace and its manifests to keep the client name out of the repo going forward (git history is intentionally not rewritten). - apps/base/farrisilk -> apps/base/customer1 (namespace, workloads, PVCs, HTTPRoutes, backup CronJob, README) - infrastructure/networking/internal/gateway-farrisilk-{odoo,metabase}.yaml -> gateway-customer1-{odoo,metabase}.yaml (listener ports unchanged: 8086/8087) - firewall comment headers updated (rules/ports untouched) No functional change beyond object names; workloads remain parked at 0. --- apps/base/{farrisilk => customer1}/README.md | 40 +++++++++---------- .../base/{farrisilk => customer1}/backup.yaml | 16 ++++---- .../{farrisilk => customer1}/httproute.yaml | 12 +++--- .../kustomization.yaml | 14 +++---- .../{farrisilk => customer1}/metabase.yaml | 14 +++---- .../{farrisilk => customer1}/namespace.yaml | 4 +- .../{farrisilk => customer1}/odoo-init.yaml | 8 ++-- apps/base/{farrisilk => customer1}/odoo.yaml | 14 +++---- .../postgres-init.yaml | 4 +- .../{farrisilk => customer1}/postgres.yaml | 10 ++--- apps/home/kustomization.yaml | 2 +- ...e.yaml => gateway-customer1-metabase.yaml} | 8 ++-- ...-odoo.yaml => gateway-customer1-odoo.yaml} | 4 +- .../host-firewall/rpi-ufw-internal-gw.sh | 4 +- .../host-firewall/siriussec-internal-gw.nft | 2 +- .../networking/internal/kustomization.yaml | 4 +- 16 files changed, 80 insertions(+), 80 deletions(-) rename apps/base/{farrisilk => customer1}/README.md (94%) rename apps/base/{farrisilk => customer1}/backup.yaml (95%) rename apps/base/{farrisilk => customer1}/httproute.yaml (81%) rename apps/base/{farrisilk => customer1}/kustomization.yaml (50%) rename apps/base/{farrisilk => customer1}/metabase.yaml (89%) rename apps/base/{farrisilk => customer1}/namespace.yaml (63%) rename apps/base/{farrisilk => customer1}/odoo-init.yaml (96%) rename apps/base/{farrisilk => customer1}/odoo.yaml (96%) rename apps/base/{farrisilk => customer1}/postgres-init.yaml (97%) rename apps/base/{farrisilk => customer1}/postgres.yaml (95%) rename infrastructure/networking/internal/{gateway-farrisilk-metabase.yaml => gateway-customer1-metabase.yaml} (72%) rename infrastructure/networking/internal/{gateway-farrisilk-odoo.yaml => gateway-customer1-odoo.yaml} (91%) diff --git a/apps/base/farrisilk/README.md b/apps/base/customer1/README.md similarity index 94% rename from apps/base/farrisilk/README.md rename to apps/base/customer1/README.md index ae1fd3c..9d13b97 100644 --- a/apps/base/farrisilk/README.md +++ b/apps/base/customer1/README.md @@ -1,14 +1,14 @@ -# farrisilk — lab replica of the Farrisilk client stack +# customer1 — lab replica of the Customer 1 client stack -A **development/audit sandbox** shaped like Farrisilk Inc.'s production stack — +A **development/audit sandbox** shaped like Customer 1 Inc.'s production stack — not a copy of their traffic, and not their architecture. Odoo 18 + a plain -PostgreSQL + Metabase, WireGuard-only, in namespace `farrisilk`. +PostgreSQL + Metabase, WireGuard-only, in namespace `customer1`. | Service | URL over WireGuard | Bare IP? | Notes | |---|---|---|---| | Odoo 18 | `http://10.10.0.2:8086/` | yes, any `Host` | `http://10.10.0.2:8086/web/login` | | Metabase | `http://10.10.0.2:8087/` | yes, any `Host` | secondary instance, 1 GiB heap | -| PostgreSQL | `pg.farrisilk.svc.cluster.local:5432` | in-cluster only | no NodePort, no gateway | +| PostgreSQL | `pg.customer1.svc.cluster.local:5432` | in-cluster only | no NodePort, no gateway | `10.10.0.2` is siriussec, the only node labelled `gateway=true` (the only node running `cilium-envoy`). Nothing here has a public hostname, a tunnel entry or a @@ -41,8 +41,8 @@ This namespace is our sandbox for developing and auditing against *their* shape: | Two hostname-less HTTPRoutes | `httproute.yaml` | Gateways live with the other internal listeners: -`infrastructure/networking/internal/gateway-farrisilk-odoo.yaml` (8086) and -`gateway-farrisilk-metabase.yaml` (8087). **Each bare-IP service gets its own +`infrastructure/networking/internal/gateway-customer1-odoo.yaml` (8086) and +`gateway-customer1-metabase.yaml` (8087). **Each bare-IP service gets its own Gateway**: Cilium renders one RouteConfiguration per Gateway and merges every hostname-less route inside it into a weighted route, so two services sharing a Gateway answer for each other at random. The host firewall @@ -65,7 +65,7 @@ separate Job to race against: - `CREATE EXTENSION IF NOT EXISTS unaccent` as the database owner; - (re)applies the read-only BI grants and credential-table revokes, every start, so tables added by a later module install are covered too; - - sets the admin login/password from Secret `farrisilk/odoo-admin` via + - sets the admin login/password from Secret `customer1/odoo-admin` via `odoo shell`. Restarting the pod is safe and visibly idempotent: @@ -80,9 +80,9 @@ Copy the module directory into the `odoo-extra-addons` PVC, then install it through the ORM: ```bash -POD=$(kubectl -n farrisilk get pod -l app=odoo -o name | head -1) -kubectl -n farrisilk cp ./client_module "${POD#pod/}:/mnt/extra-addons/client_module" -c odoo -kubectl -n farrisilk exec -i deploy/odoo -c odoo -- \ +POD=$(kubectl -n customer1 get pod -l app=odoo -o name | head -1) +kubectl -n customer1 cp ./client_module "${POD#pod/}:/mnt/extra-addons/client_module" -c odoo +kubectl -n customer1 exec -i deploy/odoo -c odoo -- \ odoo shell -c /etc/odoo-runtime/odoo.conf -d odoo --no-http --shell-interface=python <<'EOF' m = env['ir.module.module'].search([('name', '=', 'client_module')]) m.button_immediate_install() @@ -91,7 +91,7 @@ print(m.state) EOF ``` -Then `kubectl -n farrisilk delete pod -l app=odoo` once, so `init-db` re-applies +Then `kubectl -n customer1 delete pod -l app=odoo` once, so `init-db` re-applies the `metabase_ro` SELECT grants to the tables the module just created (grants are re-applied on every pod start; `ALTER DEFAULT PRIVILEGES` covers tables created after the grant but not before it). @@ -154,7 +154,7 @@ does not give you. | Item | Value | |---|---| -| CronJob | `farrisilk/pg-backup` | +| CronJob | `customer1/pg-backup` | | Schedule | `17 3 * * *`, `timeZone: America/Los_Angeles` (nightly) | | Guard rails | `concurrencyPolicy: Forbid`, `startingDeadlineSeconds: 600`, `backoffLimit: 1`, `activeDeadlineSeconds: 1800`, history 3 ok / 3 failed | | Databases | `odoo` **and** `metabase`, one `pg_dump -Fc` each | @@ -177,7 +177,7 @@ The script fails the Job (`rc=1`) if any `pg_dump` fails **or** if the archive comes back with an empty TOC — a broken backup turns red instead of silently succeeding, which a bare `pg_dump >> log 2>&1` cron does not do. -**Where the dumps actually are:** `/opt/local-path-provisioner/pvc-8f164f6c-…_farrisilk_backup-data` +**Where the dumps actually are:** `/opt/local-path-provisioner/pvc-8f164f6c-…_customer1_backup-data` on **siriussec only**. `local-path` is node-local, so the backup dies with the node. No off-box copy is implemented: the Garage S3 API at `http://10.10.0.1:3900` is reachable from a pod, but it needs a bucket plus @@ -188,8 +188,8 @@ described setup. Trigger a run on demand (what the manual proof below did): ```bash -kubectl -n farrisilk create job --from=cronjob/pg-backup pg-backup-manual-1 -kubectl -n farrisilk logs job/pg-backup-manual-1 +kubectl -n customer1 create job --from=cronjob/pg-backup pg-backup-manual-1 +kubectl -n customer1 logs job/pg-backup-manual-1 ``` ### Restore — it is TWO steps, and the second one is the one people forget @@ -214,7 +214,7 @@ bytes from the Odoo PVC by hand: ```bash # from the Odoo pod (uid 100): tar the filestore directory, not the DB -kubectl -n farrisilk exec deploy/odoo -- \ +kubectl -n customer1 exec deploy/odoo -- \ tar czf - -C /var/lib/odoo filestore | gzip -d | tar xzf - -C ``` @@ -322,13 +322,13 @@ If a future image drops wkhtmltopdf, the fix is a derived image 2 GiB — this is a *second* Metabase next to the `metabase` namespace evaluation instance and does not repeat its 1.5 GiB heap on this laptop. - State lives in the same Postgres, database `metabase`, user `metabase`. -- **`MB_ENCRYPTION_SECRET_KEY` is set** (Secret `farrisilk/metabase-secret-key`) +- **`MB_ENCRYPTION_SECRET_KEY` is set** (Secret `customer1/metabase-secret-key`) so stored data-source passwords are not encrypted with Metabase's default key. Keep it stable: rotating it makes every stored datasource password undecryptable. - Set up entirely through the API (`/api/session/properties` → `POST /api/setup` → `POST /api/session` → `POST /api/database` → `sync_schema`), one data source: - **`farrisilk odoo`** → `pg.farrisilk.svc.cluster.local:5432/odoo` as + **`customer1 odoo`** → `pg.customer1.svc.cluster.local:5432/odoo` as `metabase_ro`. - Metabase has no per-database "read-only" switch for PostgreSQL sources; the read-only guarantee here is the **role**, which is stronger (see below). @@ -386,7 +386,7 @@ Created before the Kustomization applies; never in git, never printed: | `odoo-config` | `admin_passwd` | Odoo database master password | | `odoo-admin` | `email`, `password` | Odoo web admin login (uid 2) | | `metabase-admin` | `email`, `password` | Metabase's own login (**email**, no username) | -| `metabase-data-source-creds` | `username`=metabase_ro, `password` | the `farrisilk odoo` data source | +| `metabase-data-source-creds` | `username`=metabase_ro, `password` | the `customer1 odoo` data source | | `metabase-secret-key` | `MB_ENCRYPTION_SECRET_KEY` | Metabase at-rest encryption | ## Shopify — integration surface only, blocked on client credentials @@ -415,7 +415,7 @@ the connector module). Until then the Odoo side stays unconfigured on purpose. - The card's build section names db `odoo` (owner `odoo`), §4 grants on database `odoo`, and Metabase's data source is `…:5432/odoo`, while the Odoo - config bullet said `db_name=farrisilk`. Those cannot both hold; the stack is + config bullet said `db_name=customer1`. Those cannot both hold; the stack is aligned on **`odoo`** (`db_name`, `dbfilter=^odoo$`, `ODOO_DB_NAME`, the BI grants and the Metabase source all say `odoo`). - `base,web` are installed (not `base` alone) so `/web/login` serves a real web diff --git a/apps/base/farrisilk/backup.yaml b/apps/base/customer1/backup.yaml similarity index 95% rename from apps/base/farrisilk/backup.yaml rename to apps/base/customer1/backup.yaml index 2e5e13a..4ed7a84 100644 --- a/apps/base/farrisilk/backup.yaml +++ b/apps/base/customer1/backup.yaml @@ -22,9 +22,9 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: backup-data - namespace: farrisilk + namespace: customer1 labels: - app.kubernetes.io/part-of: farrisilk + app.kubernetes.io/part-of: customer1 spec: accessModes: [ReadWriteOnce] storageClassName: local-path @@ -36,9 +36,9 @@ apiVersion: v1 kind: ConfigMap metadata: name: pg-backup-script - namespace: farrisilk + namespace: customer1 labels: - app.kubernetes.io/part-of: farrisilk + app.kubernetes.io/part-of: customer1 data: backup.sh: | #!/bin/sh @@ -88,9 +88,9 @@ apiVersion: batch/v1 kind: CronJob metadata: name: pg-backup - namespace: farrisilk + namespace: customer1 labels: - app.kubernetes.io/part-of: farrisilk + app.kubernetes.io/part-of: customer1 spec: # Parked with the stack (see odoo.yaml): no dumps while Postgres is at 0. suspend: true @@ -110,7 +110,7 @@ spec: metadata: labels: app: pg-backup - app.kubernetes.io/part-of: farrisilk + app.kubernetes.io/part-of: customer1 spec: restartPolicy: Never automountServiceAccountToken: false @@ -132,7 +132,7 @@ spec: command: ["/bin/sh", "/opt/backup/backup.sh"] env: - name: PGHOST - value: pg.farrisilk.svc.cluster.local + value: pg.customer1.svc.cluster.local - name: PGPORT value: "5432" - name: PGUSER diff --git a/apps/base/farrisilk/httproute.yaml b/apps/base/customer1/httproute.yaml similarity index 81% rename from apps/base/farrisilk/httproute.yaml rename to apps/base/customer1/httproute.yaml index 5c99157..b870d0e 100644 --- a/apps/base/farrisilk/httproute.yaml +++ b/apps/base/customer1/httproute.yaml @@ -5,16 +5,16 @@ # cannot edit /etc/hosts. Cilium renders ONE RouteConfiguration per Gateway and # merges every hostname-less route in it into a single weighted route, so two # services sharing one Gateway serve each other's traffic at random regardless -# of listener port. Hence gateway-farrisilk-odoo.yaml (8086) and -# gateway-farrisilk-metabase.yaml (8087) in infrastructure/networking/internal/. +# of listener port. Hence gateway-customer1-odoo.yaml (8086) and +# gateway-customer1-metabase.yaml (8087) in infrastructure/networking/internal/. apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: odoo - namespace: farrisilk + namespace: customer1 spec: parentRefs: - - name: farrisilk-odoo + - name: customer1-odoo namespace: internal rules: - matches: @@ -29,10 +29,10 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: metabase - namespace: farrisilk + namespace: customer1 spec: parentRefs: - - name: farrisilk-metabase + - name: customer1-metabase namespace: internal rules: - matches: diff --git a/apps/base/farrisilk/kustomization.yaml b/apps/base/customer1/kustomization.yaml similarity index 50% rename from apps/base/farrisilk/kustomization.yaml rename to apps/base/customer1/kustomization.yaml index ed462db..b25ead7 100644 --- a/apps/base/farrisilk/kustomization.yaml +++ b/apps/base/customer1/kustomization.yaml @@ -3,13 +3,13 @@ kind: Kustomization resources: - namespace.yaml # Secrets are created out of band, before this Kustomization applies: - # farrisilk/pg-app basic-auth, postgres superuser - # farrisilk/pg-users odoo/metabase/metabase_ro role passwords - # farrisilk/odoo-config admin_passwd (database master password) - # farrisilk/odoo-admin email, password (web admin login) - # farrisilk/metabase-admin email, password (Metabase's own login) - # farrisilk/metabase-data-source-creds username=metabase_ro + password - # farrisilk/metabase-secret-key MB_ENCRYPTION_SECRET_KEY + # customer1/pg-app basic-auth, postgres superuser + # customer1/pg-users odoo/metabase/metabase_ro role passwords + # customer1/odoo-config admin_passwd (database master password) + # customer1/odoo-admin email, password (web admin login) + # customer1/metabase-admin email, password (Metabase's own login) + # customer1/metabase-data-source-creds username=metabase_ro + password + # customer1/metabase-secret-key MB_ENCRYPTION_SECRET_KEY # None of them appear in git; they are not managed (or pruned) by Flux. - postgres-init.yaml - postgres.yaml diff --git a/apps/base/farrisilk/metabase.yaml b/apps/base/customer1/metabase.yaml similarity index 89% rename from apps/base/farrisilk/metabase.yaml rename to apps/base/customer1/metabase.yaml index 1c215a4..0fac78f 100644 --- a/apps/base/farrisilk/metabase.yaml +++ b/apps/base/customer1/metabase.yaml @@ -1,5 +1,5 @@ # Metabase for the lab replica — its own state in the SAME plain Postgres -# (database `metabase`), one data source: `farrisilk odoo` as `metabase_ro`. +# (database `metabase`), one data source: `customer1 odoo` as `metabase_ro`. # # This is a SECOND instance next to the evaluation one in namespace `metabase`. # The laptop is on a marginal USB-C supply, so it does not repeat that @@ -8,15 +8,15 @@ # MB_ENCRYPTION_SECRET_KEY is set here on purpose. Without it Metabase encrypts # stored data-source passwords with a key derived from its own default, so a # copy of the app DB is enough to read them. The key lives in Secret -# `farrisilk/metabase-secret-key` and must stay stable for the life of the app +# `customer1/metabase-secret-key` and must stay stable for the life of the app # DB — rotating it makes every stored datasource password undecryptable. apiVersion: apps/v1 kind: Deployment metadata: name: metabase - namespace: farrisilk + namespace: customer1 spec: - # Parked 2026-11-22 (power budget) — see apps/base/farrisilk/odoo.yaml. + # Parked 2026-11-22 (power budget) — see apps/base/customer1/odoo.yaml. replicas: 0 selector: matchLabels: @@ -25,7 +25,7 @@ spec: metadata: labels: app: metabase - app.kubernetes.io/part-of: farrisilk + app.kubernetes.io/part-of: customer1 spec: nodeSelector: kubernetes.io/hostname: siriussec @@ -46,7 +46,7 @@ spec: - name: MB_DB_TYPE value: postgres - name: MB_DB_HOST - value: pg.farrisilk.svc.cluster.local + value: pg.customer1.svc.cluster.local - name: MB_DB_PORT value: "5432" - name: MB_DB_DBNAME @@ -96,7 +96,7 @@ apiVersion: v1 kind: Service metadata: name: metabase - namespace: farrisilk + namespace: customer1 spec: type: ClusterIP selector: diff --git a/apps/base/farrisilk/namespace.yaml b/apps/base/customer1/namespace.yaml similarity index 63% rename from apps/base/farrisilk/namespace.yaml rename to apps/base/customer1/namespace.yaml index d06ff54..0fed73f 100644 --- a/apps/base/farrisilk/namespace.yaml +++ b/apps/base/customer1/namespace.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Namespace metadata: - name: farrisilk + name: customer1 labels: - app.kubernetes.io/part-of: farrisilk + app.kubernetes.io/part-of: customer1 sirius.dev/purpose: lab-replica-of-client-stack diff --git a/apps/base/farrisilk/odoo-init.yaml b/apps/base/customer1/odoo-init.yaml similarity index 96% rename from apps/base/farrisilk/odoo-init.yaml rename to apps/base/customer1/odoo-init.yaml index 47cf718..cd90251 100644 --- a/apps/base/farrisilk/odoo-init.yaml +++ b/apps/base/customer1/odoo-init.yaml @@ -9,7 +9,7 @@ # 3. CREATE EXTENSION unaccent, as the database owner # 4. (re)apply the read-only BI grants over every table Odoo just created, # including revoking the tables that carry credentials -# 5. set the admin login/password from Secret `farrisilk/odoo-admin` +# 5. set the admin login/password from Secret `customer1/odoo-admin` # # Step 4 runs unconditionally, not only on first install: it is what picks up # tables added by a later module install (`-i`/`-u` from /mnt/extra-addons), and @@ -19,11 +19,11 @@ apiVersion: v1 kind: ConfigMap metadata: name: odoo-init - namespace: farrisilk + namespace: customer1 data: init_db.py: | #!/usr/bin/env python3 - """Idempotent first-run provisioning of the Farrisilk lab Odoo database.""" + """Idempotent first-run provisioning of the Customer 1 lab Odoo database.""" import os import subprocess import sys @@ -157,7 +157,7 @@ data: print(f"metabase_ro: SELECT granted on {readable} tables; " f"revoked on {revoked}", flush=True) - # Admin login/password from Secret farrisilk/odoo-admin. `odoo shell` is + # Admin login/password from Secret customer1/odoo-admin. `odoo shell` is # the supported way to set a res.users password without hand-rolling a # pbkdf2 hash. Re-writing the same value on every start is harmless. payload = ( diff --git a/apps/base/farrisilk/odoo.yaml b/apps/base/customer1/odoo.yaml similarity index 96% rename from apps/base/farrisilk/odoo.yaml rename to apps/base/customer1/odoo.yaml index 859b17d..3ba36d4 100644 --- a/apps/base/farrisilk/odoo.yaml +++ b/apps/base/customer1/odoo.yaml @@ -1,4 +1,4 @@ -# Odoo 18 — the application half of the Farrisilk lab replica. +# Odoo 18 — the application half of the Customer 1 lab replica. # # Image is pinned to the DATED build, never `18.0`/`latest`: Odoo auto-migrates # its database schema on start, so a floating tag turns a pod restart into an @@ -12,7 +12,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: odoo-data - namespace: farrisilk + namespace: customer1 spec: accessModes: [ReadWriteOnce] storageClassName: local-path @@ -21,7 +21,7 @@ spec: storage: 10Gi --- # Empty by default. This is where the client's custom modules are copied in -# (`kubectl cp ./module farrisilk/:/mnt/extra-addons/...`), which is +# (`kubectl cp ./module customer1/:/mnt/extra-addons/...`), which is # why it is a PVC and not an emptyDir: a module installed from here must survive # a pod restart, or the modules table and the addons path disagree and Odoo # refuses to start the affected modules. @@ -29,7 +29,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: odoo-extra-addons - namespace: farrisilk + namespace: customer1 spec: accessModes: [ReadWriteOnce] storageClassName: local-path @@ -41,7 +41,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: odoo - namespace: farrisilk + namespace: customer1 spec: # Parked 2026-11-22: siriussec's 15 W adapter cannot carry this replica # stack (Odoo + two JVM/Postgres processes) alongside the public gateway @@ -56,7 +56,7 @@ spec: metadata: labels: app: odoo - app.kubernetes.io/part-of: farrisilk + app.kubernetes.io/part-of: customer1 spec: # Envoy has to reach the backend on the same node it serves from, and the # filestore PVC is local-path (siriussec-only anyway). @@ -249,7 +249,7 @@ apiVersion: v1 kind: Service metadata: name: odoo - namespace: farrisilk + namespace: customer1 spec: type: ClusterIP selector: diff --git a/apps/base/farrisilk/postgres-init.yaml b/apps/base/customer1/postgres-init.yaml similarity index 97% rename from apps/base/farrisilk/postgres-init.yaml rename to apps/base/customer1/postgres-init.yaml index 652de5e..06b3998 100644 --- a/apps/base/farrisilk/postgres-init.yaml +++ b/apps/base/customer1/postgres-init.yaml @@ -13,13 +13,13 @@ # installed them (the odoo Deployment's initContainer), because # at this point the `odoo` database has no tables at all. # -# Passwords arrive as env vars from Secret `farrisilk/pg-users` (out of band); +# Passwords arrive as env vars from Secret `customer1/pg-users` (out of band); # nothing here is a credential literal. apiVersion: v1 kind: ConfigMap metadata: name: pg-init - namespace: farrisilk + namespace: customer1 data: 01-init-dbs.sh: | #!/bin/bash diff --git a/apps/base/farrisilk/postgres.yaml b/apps/base/customer1/postgres.yaml similarity index 95% rename from apps/base/farrisilk/postgres.yaml rename to apps/base/customer1/postgres.yaml index c2710a2..2de1599 100644 --- a/apps/base/farrisilk/postgres.yaml +++ b/apps/base/customer1/postgres.yaml @@ -16,7 +16,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pg-data - namespace: farrisilk + namespace: customer1 spec: accessModes: [ReadWriteOnce] storageClassName: local-path @@ -28,9 +28,9 @@ apiVersion: apps/v1 kind: Deployment metadata: name: pg - namespace: farrisilk + namespace: customer1 spec: - # Parked 2026-11-22 (power budget) — see apps/base/farrisilk/odoo.yaml. + # Parked 2026-11-22 (power budget) — see apps/base/customer1/odoo.yaml. # Recreate: the data directory must be released before anything restarts. replicas: 0 strategy: @@ -42,7 +42,7 @@ spec: metadata: labels: app: pg - app.kubernetes.io/part-of: farrisilk + app.kubernetes.io/part-of: customer1 spec: nodeSelector: kubernetes.io/hostname: siriussec @@ -131,7 +131,7 @@ apiVersion: v1 kind: Service metadata: name: pg - namespace: farrisilk + namespace: customer1 spec: type: ClusterIP selector: diff --git a/apps/home/kustomization.yaml b/apps/home/kustomization.yaml index 55b2076..de35548 100644 --- a/apps/home/kustomization.yaml +++ b/apps/home/kustomization.yaml @@ -7,4 +7,4 @@ resources: - ../base/sirius-growth - ../base/osint - ../base/metabase - - ../base/farrisilk + - ../base/customer1 diff --git a/infrastructure/networking/internal/gateway-farrisilk-metabase.yaml b/infrastructure/networking/internal/gateway-customer1-metabase.yaml similarity index 72% rename from infrastructure/networking/internal/gateway-farrisilk-metabase.yaml rename to infrastructure/networking/internal/gateway-customer1-metabase.yaml index 8619fb6..9c8ece1 100644 --- a/infrastructure/networking/internal/gateway-farrisilk-metabase.yaml +++ b/infrastructure/networking/internal/gateway-customer1-metabase.yaml @@ -1,5 +1,5 @@ -# Own Gateway for the Farrisilk lab Metabase (:8087) — see -# gateway-farrisilk-odoo.yaml for why one bare-IP service per Gateway. +# Own Gateway for the Customer 1 lab Metabase (:8087) — see +# gateway-customer1-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 @@ -7,12 +7,12 @@ apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: farrisilk-metabase + name: customer1-metabase namespace: internal labels: dedicated: network annotations: - sirius.dev/purpose: bare-IP listener for the Farrisilk lab Metabase (WireGuard only) + sirius.dev/purpose: bare-IP listener for the Customer 1 lab Metabase (WireGuard only) spec: gatewayClassName: cilium listeners: diff --git a/infrastructure/networking/internal/gateway-farrisilk-odoo.yaml b/infrastructure/networking/internal/gateway-customer1-odoo.yaml similarity index 91% rename from infrastructure/networking/internal/gateway-farrisilk-odoo.yaml rename to infrastructure/networking/internal/gateway-customer1-odoo.yaml index 5a65a7b..d0d5315 100644 --- a/infrastructure/networking/internal/gateway-farrisilk-odoo.yaml +++ b/infrastructure/networking/internal/gateway-customer1-odoo.yaml @@ -12,12 +12,12 @@ apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: farrisilk-odoo + name: customer1-odoo namespace: internal labels: dedicated: network annotations: - sirius.dev/purpose: bare-IP listener for the Farrisilk lab Odoo (WireGuard only) + sirius.dev/purpose: bare-IP listener for the Customer 1 lab Odoo (WireGuard only) spec: gatewayClassName: cilium listeners: diff --git a/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh b/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh index 16dfe94..f20e0f8 100644 --- a/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh +++ b/infrastructure/networking/internal/host-firewall/rpi-ufw-internal-gw.sh @@ -8,8 +8,8 @@ # Ports: 8081 = Grafana (`internal` Gateway listener http-internal), # 8084 = Hubble UI (`internal` Gateway listener hubble-ui), # 8085 = Metabase (`metabase` Gateway listener http-internal), -# 8086 = Farrisilk lab Odoo (`farrisilk-odoo` Gateway), -# 8087 = Farrisilk lab Metabase (`farrisilk-metabase` Gateway). +# 8086 = Customer 1 lab Odoo (`customer1-odoo` Gateway), +# 8087 = Customer 1 lab Metabase (`customer1-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. # diff --git a/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft b/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft index 046a53c..6f07915 100644 --- a/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft +++ b/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft @@ -1,6 +1,6 @@ #!/usr/sbin/nft -f # Internal (WireGuard-only) gateway listeners: TCP 8081 (Grafana), 8084 -# (Hubble UI), 8085 (Metabase) and 8086/8087 (Farrisilk lab replica: Odoo, +# (Hubble UI), 8085 (Metabase) and 8086/8087 (Customer 1 lab replica: Odoo, # Metabase). # # Cilium's hostNetwork Envoy binds every Gateway listener on 0.0.0.0, so the diff --git a/infrastructure/networking/internal/kustomization.yaml b/infrastructure/networking/internal/kustomization.yaml index fc93e64..a0c4937 100644 --- a/infrastructure/networking/internal/kustomization.yaml +++ b/infrastructure/networking/internal/kustomization.yaml @@ -5,5 +5,5 @@ resources: - gateway.yaml - gateway-hubble-ui.yaml - gateway-metabase.yaml - - gateway-farrisilk-odoo.yaml - - gateway-farrisilk-metabase.yaml + - gateway-customer1-odoo.yaml + - gateway-customer1-metabase.yaml