Compare commits
22 changed files with 85 additions and 144 deletions
|
|
@ -1,14 +1,14 @@
|
|||
# customer1 — lab replica of the Customer 1 client stack
|
||||
# farrisilk — lab replica of the Farrisilk client stack
|
||||
|
||||
A **development/audit sandbox** shaped like Customer 1 Inc.'s production 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 `customer1`.
|
||||
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.customer1.svc.cluster.local:5432` | in-cluster only | no NodePort, no gateway |
|
||||
| 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
|
||||
|
|
@ -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-customer1-odoo.yaml` (8086) and
|
||||
`gateway-customer1-metabase.yaml` (8087). **Each bare-IP service gets its own
|
||||
`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
|
||||
|
|
@ -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 `customer1/odoo-admin` via
|
||||
- sets the admin login/password from Secret `farrisilk/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 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 -- \
|
||||
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()
|
||||
|
|
@ -91,7 +91,7 @@ print(m.state)
|
|||
EOF
|
||||
```
|
||||
|
||||
Then `kubectl -n customer1 delete pod -l app=odoo` once, so `init-db` re-applies
|
||||
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).
|
||||
|
|
@ -154,7 +154,7 @@ does not give you.
|
|||
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| CronJob | `customer1/pg-backup` |
|
||||
| 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 |
|
||||
|
|
@ -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-…_customer1_backup-data`
|
||||
**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
|
||||
|
|
@ -188,8 +188,8 @@ described setup.
|
|||
Trigger a run on demand (what the manual proof below did):
|
||||
|
||||
```bash
|
||||
kubectl -n customer1 create job --from=cronjob/pg-backup pg-backup-manual-1
|
||||
kubectl -n customer1 logs job/pg-backup-manual-1
|
||||
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
|
||||
|
|
@ -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 customer1 exec deploy/odoo -- \
|
||||
kubectl -n farrisilk exec deploy/odoo -- \
|
||||
tar czf - -C /var/lib/odoo filestore | gzip -d | tar xzf - -C <restore-data-dir>
|
||||
```
|
||||
|
||||
|
|
@ -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 `customer1/metabase-secret-key`)
|
||||
- **`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:
|
||||
**`customer1 odoo`** → `pg.customer1.svc.cluster.local:5432/odoo` as
|
||||
**`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).
|
||||
|
|
@ -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 `customer1 odoo` data source |
|
||||
| `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
|
||||
|
|
@ -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=customer1`. Those cannot both hold; the stack is
|
||||
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
|
||||
|
|
@ -22,9 +22,9 @@ apiVersion: v1
|
|||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: backup-data
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
labels:
|
||||
app.kubernetes.io/part-of: customer1
|
||||
app.kubernetes.io/part-of: farrisilk
|
||||
spec:
|
||||
accessModes: [ReadWriteOnce]
|
||||
storageClassName: local-path
|
||||
|
|
@ -36,9 +36,9 @@ apiVersion: v1
|
|||
kind: ConfigMap
|
||||
metadata:
|
||||
name: pg-backup-script
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
labels:
|
||||
app.kubernetes.io/part-of: customer1
|
||||
app.kubernetes.io/part-of: farrisilk
|
||||
data:
|
||||
backup.sh: |
|
||||
#!/bin/sh
|
||||
|
|
@ -88,12 +88,10 @@ apiVersion: batch/v1
|
|||
kind: CronJob
|
||||
metadata:
|
||||
name: pg-backup
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
labels:
|
||||
app.kubernetes.io/part-of: customer1
|
||||
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 * * *"
|
||||
|
|
@ -110,7 +108,7 @@ spec:
|
|||
metadata:
|
||||
labels:
|
||||
app: pg-backup
|
||||
app.kubernetes.io/part-of: customer1
|
||||
app.kubernetes.io/part-of: farrisilk
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
automountServiceAccountToken: false
|
||||
|
|
@ -132,7 +130,7 @@ spec:
|
|||
command: ["/bin/sh", "/opt/backup/backup.sh"]
|
||||
env:
|
||||
- name: PGHOST
|
||||
value: pg.customer1.svc.cluster.local
|
||||
value: pg.farrisilk.svc.cluster.local
|
||||
- name: PGPORT
|
||||
value: "5432"
|
||||
- name: PGUSER
|
||||
|
|
@ -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-customer1-odoo.yaml (8086) and
|
||||
# gateway-customer1-metabase.yaml (8087) in infrastructure/networking/internal/.
|
||||
# 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: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: customer1-odoo
|
||||
- name: farrisilk-odoo
|
||||
namespace: internal
|
||||
rules:
|
||||
- matches:
|
||||
|
|
@ -29,10 +29,10 @@ apiVersion: gateway.networking.k8s.io/v1
|
|||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: metabase
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: customer1-metabase
|
||||
- name: farrisilk-metabase
|
||||
namespace: internal
|
||||
rules:
|
||||
- matches:
|
||||
|
|
@ -3,13 +3,13 @@ kind: Kustomization
|
|||
resources:
|
||||
- namespace.yaml
|
||||
# Secrets are created out of band, before this Kustomization applies:
|
||||
# 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
|
||||
# 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
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# Metabase for the lab replica — its own state in the SAME plain Postgres
|
||||
# (database `metabase`), one data source: `customer1 odoo` as `metabase_ro`.
|
||||
# (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
|
||||
|
|
@ -8,16 +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
|
||||
# `customer1/metabase-secret-key` and must stay stable for the life of the app
|
||||
# `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: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
# Parked 2026-11-22 (power budget) — see apps/base/customer1/odoo.yaml.
|
||||
replicas: 0
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: metabase
|
||||
|
|
@ -25,7 +24,7 @@ spec:
|
|||
metadata:
|
||||
labels:
|
||||
app: metabase
|
||||
app.kubernetes.io/part-of: customer1
|
||||
app.kubernetes.io/part-of: farrisilk
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: siriussec
|
||||
|
|
@ -46,7 +45,7 @@ spec:
|
|||
- name: MB_DB_TYPE
|
||||
value: postgres
|
||||
- name: MB_DB_HOST
|
||||
value: pg.customer1.svc.cluster.local
|
||||
value: pg.farrisilk.svc.cluster.local
|
||||
- name: MB_DB_PORT
|
||||
value: "5432"
|
||||
- name: MB_DB_DBNAME
|
||||
|
|
@ -88,15 +87,14 @@ spec:
|
|||
cpu: 250m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
# Capped with the main Metabase: see apps/base/metabase/deployment.yaml
|
||||
cpu: "1"
|
||||
cpu: "2"
|
||||
memory: 2Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: metabase
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: customer1
|
||||
name: farrisilk
|
||||
labels:
|
||||
app.kubernetes.io/part-of: customer1
|
||||
app.kubernetes.io/part-of: farrisilk
|
||||
sirius.dev/purpose: lab-replica-of-client-stack
|
||||
|
|
@ -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 `customer1/odoo-admin`
|
||||
# 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
|
||||
|
|
@ -19,11 +19,11 @@ apiVersion: v1
|
|||
kind: ConfigMap
|
||||
metadata:
|
||||
name: odoo-init
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
data:
|
||||
init_db.py: |
|
||||
#!/usr/bin/env python3
|
||||
"""Idempotent first-run provisioning of the Customer 1 lab Odoo database."""
|
||||
"""Idempotent first-run provisioning of the Farrisilk 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 customer1/odoo-admin. `odoo shell` is
|
||||
# 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 = (
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Odoo 18 — the application half of the Customer 1 lab replica.
|
||||
# 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
|
||||
|
|
@ -12,7 +12,7 @@ apiVersion: v1
|
|||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: odoo-data
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
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 customer1/<odoo-pod>:/mnt/extra-addons/...`), which is
|
||||
# (`kubectl cp ./module farrisilk/<odoo-pod>:/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: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
accessModes: [ReadWriteOnce]
|
||||
storageClassName: local-path
|
||||
|
|
@ -41,12 +41,9 @@ apiVersion: apps/v1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: odoo
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
# 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
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
|
|
@ -56,7 +53,7 @@ spec:
|
|||
metadata:
|
||||
labels:
|
||||
app: odoo
|
||||
app.kubernetes.io/part-of: customer1
|
||||
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).
|
||||
|
|
@ -249,7 +246,7 @@ apiVersion: v1
|
|||
kind: Service
|
||||
metadata:
|
||||
name: odoo
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
|
|
@ -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 `customer1/pg-users` (out of band);
|
||||
# Passwords arrive as env vars from Secret `farrisilk/pg-users` (out of band);
|
||||
# nothing here is a credential literal.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: pg-init
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
data:
|
||||
01-init-dbs.sh: |
|
||||
#!/bin/bash
|
||||
|
|
@ -16,7 +16,7 @@ apiVersion: v1
|
|||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: pg-data
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
accessModes: [ReadWriteOnce]
|
||||
storageClassName: local-path
|
||||
|
|
@ -28,11 +28,10 @@ apiVersion: apps/v1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: pg
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
# Parked 2026-11-22 (power budget) — see apps/base/customer1/odoo.yaml.
|
||||
# Recreate: the data directory must be released before anything restarts.
|
||||
replicas: 0
|
||||
replicas: 1
|
||||
# RWO volume: two pods must never hold the data directory at once.
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
|
|
@ -42,7 +41,7 @@ spec:
|
|||
metadata:
|
||||
labels:
|
||||
app: pg
|
||||
app.kubernetes.io/part-of: customer1
|
||||
app.kubernetes.io/part-of: farrisilk
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: siriussec
|
||||
|
|
@ -131,7 +130,7 @@ apiVersion: v1
|
|||
kind: Service
|
||||
metadata:
|
||||
name: pg
|
||||
namespace: customer1
|
||||
namespace: farrisilk
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
# 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/*
|
||||
|
|
@ -61,11 +61,6 @@ 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: /
|
||||
|
|
@ -82,6 +77,3 @@ spec:
|
|||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: forgejo-data
|
||||
- name: custom-public
|
||||
configMap:
|
||||
name: forgejo-custom-public
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ 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
|
||||
|
|
|
|||
|
|
@ -117,11 +117,6 @@ 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
|
||||
|
|
|
|||
|
|
@ -79,9 +79,5 @@ spec:
|
|||
cpu: 250m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
# 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"
|
||||
cpu: "2"
|
||||
memory: 2Gi
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ spec:
|
|||
memory: 128Mi
|
||||
containers:
|
||||
- name: nginx
|
||||
image: forgejo.siriusdevops.com/sirius/siriusdevops-site:399c421f51a2fd74a87e810641226d58e4e22690
|
||||
image: forgejo.siriusdevops.com/sirius/siriusdevops-site:799afe40192182cd418652a638376f06e3b1adeb
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@ resources:
|
|||
- ../base/sirius-growth
|
||||
- ../base/osint
|
||||
- ../base/metabase
|
||||
- ../base/customer1
|
||||
- ../base/farrisilk
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Own Gateway for the Customer 1 lab Metabase (:8087) — see
|
||||
# gateway-customer1-odoo.yaml for why one bare-IP service per Gateway.
|
||||
# Own Gateway for the Farrisilk lab Metabase (:8087) — see
|
||||
# gateway-farrisilk-odoo.yaml for why one bare-IP service per Gateway.
|
||||
#
|
||||
# This is NOT the evaluation instance in namespace `metabase` (:8085). Same
|
||||
# reasoning applies to the port choice: one listener port carries exactly one
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: customer1-metabase
|
||||
name: farrisilk-metabase
|
||||
namespace: internal
|
||||
labels:
|
||||
dedicated: network
|
||||
annotations:
|
||||
sirius.dev/purpose: bare-IP listener for the Customer 1 lab Metabase (WireGuard only)
|
||||
sirius.dev/purpose: bare-IP listener for the Farrisilk lab Metabase (WireGuard only)
|
||||
spec:
|
||||
gatewayClassName: cilium
|
||||
listeners:
|
||||
|
|
@ -12,12 +12,12 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: customer1-odoo
|
||||
name: farrisilk-odoo
|
||||
namespace: internal
|
||||
labels:
|
||||
dedicated: network
|
||||
annotations:
|
||||
sirius.dev/purpose: bare-IP listener for the Customer 1 lab Odoo (WireGuard only)
|
||||
sirius.dev/purpose: bare-IP listener for the Farrisilk lab Odoo (WireGuard only)
|
||||
spec:
|
||||
gatewayClassName: cilium
|
||||
listeners:
|
||||
|
|
@ -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 = Customer 1 lab Odoo (`customer1-odoo` Gateway),
|
||||
# 8087 = Customer 1 lab Metabase (`customer1-metabase` Gateway).
|
||||
# 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.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/sbin/nft -f
|
||||
# Internal (WireGuard-only) gateway listeners: TCP 8081 (Grafana), 8084
|
||||
# (Hubble UI), 8085 (Metabase) and 8086/8087 (Customer 1 lab replica: Odoo,
|
||||
# (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
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ resources:
|
|||
- gateway.yaml
|
||||
- gateway-hubble-ui.yaml
|
||||
- gateway-metabase.yaml
|
||||
- gateway-customer1-odoo.yaml
|
||||
- gateway-customer1-metabase.yaml
|
||||
- gateway-farrisilk-odoo.yaml
|
||||
- gateway-farrisilk-metabase.yaml
|
||||
|
|
|
|||
Loading…
Reference in a new issue