apps(customer1): anonymize client name — farrisilk → customer1 #38
16 changed files with 80 additions and 80 deletions
|
|
@ -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
|
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 |
|
| 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` |
|
| 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 |
|
| 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
|
`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
|
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` |
|
| Two hostname-less HTTPRoutes | `httproute.yaml` |
|
||||||
|
|
||||||
Gateways live with the other internal listeners:
|
Gateways live with the other internal listeners:
|
||||||
`infrastructure/networking/internal/gateway-farrisilk-odoo.yaml` (8086) and
|
`infrastructure/networking/internal/gateway-customer1-odoo.yaml` (8086) and
|
||||||
`gateway-farrisilk-metabase.yaml` (8087). **Each bare-IP service gets its own
|
`gateway-customer1-metabase.yaml` (8087). **Each bare-IP service gets its own
|
||||||
Gateway**: Cilium renders one RouteConfiguration per Gateway and merges every
|
Gateway**: Cilium renders one RouteConfiguration per Gateway and merges every
|
||||||
hostname-less route inside it into a weighted route, so two services sharing a
|
hostname-less route inside it into a weighted route, so two services sharing a
|
||||||
Gateway answer for each other at random. The host firewall
|
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;
|
- `CREATE EXTENSION IF NOT EXISTS unaccent` as the database owner;
|
||||||
- (re)applies the read-only BI grants and credential-table revokes, every
|
- (re)applies the read-only BI grants and credential-table revokes, every
|
||||||
start, so tables added by a later module install are covered too;
|
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`.
|
`odoo shell`.
|
||||||
|
|
||||||
Restarting the pod is safe and visibly idempotent:
|
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:
|
through the ORM:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
POD=$(kubectl -n farrisilk get pod -l app=odoo -o name | head -1)
|
POD=$(kubectl -n customer1 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 customer1 cp ./client_module "${POD#pod/}:/mnt/extra-addons/client_module" -c odoo
|
||||||
kubectl -n farrisilk exec -i deploy/odoo -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'
|
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 = env['ir.module.module'].search([('name', '=', 'client_module')])
|
||||||
m.button_immediate_install()
|
m.button_immediate_install()
|
||||||
|
|
@ -91,7 +91,7 @@ print(m.state)
|
||||||
EOF
|
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
|
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
|
are re-applied on every pod start; `ALTER DEFAULT PRIVILEGES` covers tables
|
||||||
created after the grant but not before it).
|
created after the grant but not before it).
|
||||||
|
|
@ -154,7 +154,7 @@ does not give you.
|
||||||
|
|
||||||
| Item | Value |
|
| Item | Value |
|
||||||
|---|---|
|
|---|---|
|
||||||
| CronJob | `farrisilk/pg-backup` |
|
| CronJob | `customer1/pg-backup` |
|
||||||
| Schedule | `17 3 * * *`, `timeZone: America/Los_Angeles` (nightly) |
|
| Schedule | `17 3 * * *`, `timeZone: America/Los_Angeles` (nightly) |
|
||||||
| Guard rails | `concurrencyPolicy: Forbid`, `startingDeadlineSeconds: 600`, `backoffLimit: 1`, `activeDeadlineSeconds: 1800`, history 3 ok / 3 failed |
|
| Guard rails | `concurrencyPolicy: Forbid`, `startingDeadlineSeconds: 600`, `backoffLimit: 1`, `activeDeadlineSeconds: 1800`, history 3 ok / 3 failed |
|
||||||
| Databases | `odoo` **and** `metabase`, one `pg_dump -Fc` each |
|
| 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
|
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.
|
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
|
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
|
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
|
`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):
|
Trigger a run on demand (what the manual proof below did):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl -n farrisilk create job --from=cronjob/pg-backup pg-backup-manual-1
|
kubectl -n customer1 create job --from=cronjob/pg-backup pg-backup-manual-1
|
||||||
kubectl -n farrisilk logs job/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
|
### 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
|
```bash
|
||||||
# from the Odoo pod (uid 100): tar the filestore directory, not the DB
|
# 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 <restore-data-dir>
|
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
|
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.
|
evaluation instance and does not repeat its 1.5 GiB heap on this laptop.
|
||||||
- State lives in the same Postgres, database `metabase`, user `metabase`.
|
- 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.
|
so stored data-source passwords are not encrypted with Metabase's default key.
|
||||||
Keep it stable: rotating it makes every stored datasource password
|
Keep it stable: rotating it makes every stored datasource password
|
||||||
undecryptable.
|
undecryptable.
|
||||||
- Set up entirely through the API (`/api/session/properties` → `POST /api/setup`
|
- Set up entirely through the API (`/api/session/properties` → `POST /api/setup`
|
||||||
→ `POST /api/session` → `POST /api/database` → `sync_schema`), one data source:
|
→ `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_ro`.
|
||||||
- Metabase has no per-database "read-only" switch for PostgreSQL sources; the
|
- Metabase has no per-database "read-only" switch for PostgreSQL sources; the
|
||||||
read-only guarantee here is the **role**, which is stronger (see below).
|
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-config` | `admin_passwd` | Odoo database master password |
|
||||||
| `odoo-admin` | `email`, `password` | Odoo web admin login (uid 2) |
|
| `odoo-admin` | `email`, `password` | Odoo web admin login (uid 2) |
|
||||||
| `metabase-admin` | `email`, `password` | Metabase's own login (**email**, no username) |
|
| `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 |
|
| `metabase-secret-key` | `MB_ENCRYPTION_SECRET_KEY` | Metabase at-rest encryption |
|
||||||
|
|
||||||
## Shopify — integration surface only, blocked on client credentials
|
## 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
|
- 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
|
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
|
aligned on **`odoo`** (`db_name`, `dbfilter=^odoo$`, `ODOO_DB_NAME`, the BI
|
||||||
grants and the Metabase source all say `odoo`).
|
grants and the Metabase source all say `odoo`).
|
||||||
- `base,web` are installed (not `base` alone) so `/web/login` serves a real web
|
- `base,web` are installed (not `base` alone) so `/web/login` serves a real web
|
||||||
|
|
@ -22,9 +22,9 @@ apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: backup-data
|
name: backup-data
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/part-of: farrisilk
|
app.kubernetes.io/part-of: customer1
|
||||||
spec:
|
spec:
|
||||||
accessModes: [ReadWriteOnce]
|
accessModes: [ReadWriteOnce]
|
||||||
storageClassName: local-path
|
storageClassName: local-path
|
||||||
|
|
@ -36,9 +36,9 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: pg-backup-script
|
name: pg-backup-script
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/part-of: farrisilk
|
app.kubernetes.io/part-of: customer1
|
||||||
data:
|
data:
|
||||||
backup.sh: |
|
backup.sh: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
@ -88,9 +88,9 @@ apiVersion: batch/v1
|
||||||
kind: CronJob
|
kind: CronJob
|
||||||
metadata:
|
metadata:
|
||||||
name: pg-backup
|
name: pg-backup
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/part-of: farrisilk
|
app.kubernetes.io/part-of: customer1
|
||||||
spec:
|
spec:
|
||||||
# Parked with the stack (see odoo.yaml): no dumps while Postgres is at 0.
|
# Parked with the stack (see odoo.yaml): no dumps while Postgres is at 0.
|
||||||
suspend: true
|
suspend: true
|
||||||
|
|
@ -110,7 +110,7 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: pg-backup
|
app: pg-backup
|
||||||
app.kubernetes.io/part-of: farrisilk
|
app.kubernetes.io/part-of: customer1
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
automountServiceAccountToken: false
|
automountServiceAccountToken: false
|
||||||
|
|
@ -132,7 +132,7 @@ spec:
|
||||||
command: ["/bin/sh", "/opt/backup/backup.sh"]
|
command: ["/bin/sh", "/opt/backup/backup.sh"]
|
||||||
env:
|
env:
|
||||||
- name: PGHOST
|
- name: PGHOST
|
||||||
value: pg.farrisilk.svc.cluster.local
|
value: pg.customer1.svc.cluster.local
|
||||||
- name: PGPORT
|
- name: PGPORT
|
||||||
value: "5432"
|
value: "5432"
|
||||||
- name: PGUSER
|
- name: PGUSER
|
||||||
|
|
@ -5,16 +5,16 @@
|
||||||
# cannot edit /etc/hosts. Cilium renders ONE RouteConfiguration per Gateway and
|
# 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
|
# 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
|
# services sharing one Gateway serve each other's traffic at random regardless
|
||||||
# of listener port. Hence gateway-farrisilk-odoo.yaml (8086) and
|
# of listener port. Hence gateway-customer1-odoo.yaml (8086) and
|
||||||
# gateway-farrisilk-metabase.yaml (8087) in infrastructure/networking/internal/.
|
# gateway-customer1-metabase.yaml (8087) in infrastructure/networking/internal/.
|
||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: odoo
|
name: odoo
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: farrisilk-odoo
|
- name: customer1-odoo
|
||||||
namespace: internal
|
namespace: internal
|
||||||
rules:
|
rules:
|
||||||
- matches:
|
- matches:
|
||||||
|
|
@ -29,10 +29,10 @@ apiVersion: gateway.networking.k8s.io/v1
|
||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: metabase
|
name: metabase
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: farrisilk-metabase
|
- name: customer1-metabase
|
||||||
namespace: internal
|
namespace: internal
|
||||||
rules:
|
rules:
|
||||||
- matches:
|
- matches:
|
||||||
|
|
@ -3,13 +3,13 @@ kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
# Secrets are created out of band, before this Kustomization applies:
|
# Secrets are created out of band, before this Kustomization applies:
|
||||||
# farrisilk/pg-app basic-auth, postgres superuser
|
# customer1/pg-app basic-auth, postgres superuser
|
||||||
# farrisilk/pg-users odoo/metabase/metabase_ro role passwords
|
# customer1/pg-users odoo/metabase/metabase_ro role passwords
|
||||||
# farrisilk/odoo-config admin_passwd (database master password)
|
# customer1/odoo-config admin_passwd (database master password)
|
||||||
# farrisilk/odoo-admin email, password (web admin login)
|
# customer1/odoo-admin email, password (web admin login)
|
||||||
# farrisilk/metabase-admin email, password (Metabase's own login)
|
# customer1/metabase-admin email, password (Metabase's own login)
|
||||||
# farrisilk/metabase-data-source-creds username=metabase_ro + password
|
# customer1/metabase-data-source-creds username=metabase_ro + password
|
||||||
# farrisilk/metabase-secret-key MB_ENCRYPTION_SECRET_KEY
|
# customer1/metabase-secret-key MB_ENCRYPTION_SECRET_KEY
|
||||||
# None of them appear in git; they are not managed (or pruned) by Flux.
|
# None of them appear in git; they are not managed (or pruned) by Flux.
|
||||||
- postgres-init.yaml
|
- postgres-init.yaml
|
||||||
- postgres.yaml
|
- postgres.yaml
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Metabase for the lab replica — its own state in the SAME plain Postgres
|
# 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`.
|
# 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
|
# 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
|
# 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
|
# 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
|
# 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.
|
# DB — rotating it makes every stored datasource password undecryptable.
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: metabase
|
name: metabase
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
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
|
replicas: 0
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
|
@ -25,7 +25,7 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: metabase
|
app: metabase
|
||||||
app.kubernetes.io/part-of: farrisilk
|
app.kubernetes.io/part-of: customer1
|
||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/hostname: siriussec
|
kubernetes.io/hostname: siriussec
|
||||||
|
|
@ -46,7 +46,7 @@ spec:
|
||||||
- name: MB_DB_TYPE
|
- name: MB_DB_TYPE
|
||||||
value: postgres
|
value: postgres
|
||||||
- name: MB_DB_HOST
|
- name: MB_DB_HOST
|
||||||
value: pg.farrisilk.svc.cluster.local
|
value: pg.customer1.svc.cluster.local
|
||||||
- name: MB_DB_PORT
|
- name: MB_DB_PORT
|
||||||
value: "5432"
|
value: "5432"
|
||||||
- name: MB_DB_DBNAME
|
- name: MB_DB_DBNAME
|
||||||
|
|
@ -96,7 +96,7 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: metabase
|
name: metabase
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: farrisilk
|
name: customer1
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/part-of: farrisilk
|
app.kubernetes.io/part-of: customer1
|
||||||
sirius.dev/purpose: lab-replica-of-client-stack
|
sirius.dev/purpose: lab-replica-of-client-stack
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
# 3. CREATE EXTENSION unaccent, as the database owner
|
# 3. CREATE EXTENSION unaccent, as the database owner
|
||||||
# 4. (re)apply the read-only BI grants over every table Odoo just created,
|
# 4. (re)apply the read-only BI grants over every table Odoo just created,
|
||||||
# including revoking the tables that carry credentials
|
# 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
|
# 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
|
# tables added by a later module install (`-i`/`-u` from /mnt/extra-addons), and
|
||||||
|
|
@ -19,11 +19,11 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: odoo-init
|
name: odoo-init
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
data:
|
data:
|
||||||
init_db.py: |
|
init_db.py: |
|
||||||
#!/usr/bin/env python3
|
#!/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 os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
@ -157,7 +157,7 @@ data:
|
||||||
print(f"metabase_ro: SELECT granted on {readable} tables; "
|
print(f"metabase_ro: SELECT granted on {readable} tables; "
|
||||||
f"revoked on {revoked}", flush=True)
|
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
|
# 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.
|
# pbkdf2 hash. Re-writing the same value on every start is harmless.
|
||||||
payload = (
|
payload = (
|
||||||
|
|
@ -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
|
# 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
|
# its database schema on start, so a floating tag turns a pod restart into an
|
||||||
|
|
@ -12,7 +12,7 @@ apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: odoo-data
|
name: odoo-data
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
accessModes: [ReadWriteOnce]
|
accessModes: [ReadWriteOnce]
|
||||||
storageClassName: local-path
|
storageClassName: local-path
|
||||||
|
|
@ -21,7 +21,7 @@ spec:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
---
|
---
|
||||||
# Empty by default. This is where the client's custom modules are copied in
|
# Empty by default. This is where the client's custom modules are copied in
|
||||||
# (`kubectl cp ./module farrisilk/<odoo-pod>:/mnt/extra-addons/...`), which is
|
# (`kubectl cp ./module customer1/<odoo-pod>:/mnt/extra-addons/...`), which is
|
||||||
# why it is a PVC and not an emptyDir: a module installed from here must survive
|
# 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
|
# a pod restart, or the modules table and the addons path disagree and Odoo
|
||||||
# refuses to start the affected modules.
|
# refuses to start the affected modules.
|
||||||
|
|
@ -29,7 +29,7 @@ apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: odoo-extra-addons
|
name: odoo-extra-addons
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
accessModes: [ReadWriteOnce]
|
accessModes: [ReadWriteOnce]
|
||||||
storageClassName: local-path
|
storageClassName: local-path
|
||||||
|
|
@ -41,7 +41,7 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: odoo
|
name: odoo
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
# Parked 2026-11-22: siriussec's 15 W adapter cannot carry this replica
|
# Parked 2026-11-22: siriussec's 15 W adapter cannot carry this replica
|
||||||
# stack (Odoo + two JVM/Postgres processes) alongside the public gateway
|
# stack (Odoo + two JVM/Postgres processes) alongside the public gateway
|
||||||
|
|
@ -56,7 +56,7 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: odoo
|
app: odoo
|
||||||
app.kubernetes.io/part-of: farrisilk
|
app.kubernetes.io/part-of: customer1
|
||||||
spec:
|
spec:
|
||||||
# Envoy has to reach the backend on the same node it serves from, and the
|
# Envoy has to reach the backend on the same node it serves from, and the
|
||||||
# filestore PVC is local-path (siriussec-only anyway).
|
# filestore PVC is local-path (siriussec-only anyway).
|
||||||
|
|
@ -249,7 +249,7 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: odoo
|
name: odoo
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -13,13 +13,13 @@
|
||||||
# installed them (the odoo Deployment's initContainer), because
|
# installed them (the odoo Deployment's initContainer), because
|
||||||
# at this point the `odoo` database has no tables at all.
|
# 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.
|
# nothing here is a credential literal.
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: pg-init
|
name: pg-init
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
data:
|
data:
|
||||||
01-init-dbs.sh: |
|
01-init-dbs.sh: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
@ -16,7 +16,7 @@ apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: pg-data
|
name: pg-data
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
accessModes: [ReadWriteOnce]
|
accessModes: [ReadWriteOnce]
|
||||||
storageClassName: local-path
|
storageClassName: local-path
|
||||||
|
|
@ -28,9 +28,9 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: pg
|
name: pg
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
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.
|
# Recreate: the data directory must be released before anything restarts.
|
||||||
replicas: 0
|
replicas: 0
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -42,7 +42,7 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: pg
|
app: pg
|
||||||
app.kubernetes.io/part-of: farrisilk
|
app.kubernetes.io/part-of: customer1
|
||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/hostname: siriussec
|
kubernetes.io/hostname: siriussec
|
||||||
|
|
@ -131,7 +131,7 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: pg
|
name: pg
|
||||||
namespace: farrisilk
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -7,4 +7,4 @@ resources:
|
||||||
- ../base/sirius-growth
|
- ../base/sirius-growth
|
||||||
- ../base/osint
|
- ../base/osint
|
||||||
- ../base/metabase
|
- ../base/metabase
|
||||||
- ../base/farrisilk
|
- ../base/customer1
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Own Gateway for the Farrisilk lab Metabase (:8087) — see
|
# Own Gateway for the Customer 1 lab Metabase (:8087) — see
|
||||||
# gateway-farrisilk-odoo.yaml for why one bare-IP service per Gateway.
|
# gateway-customer1-odoo.yaml for why one bare-IP service per Gateway.
|
||||||
#
|
#
|
||||||
# This is NOT the evaluation instance in namespace `metabase` (:8085). Same
|
# This is NOT the evaluation instance in namespace `metabase` (:8085). Same
|
||||||
# reasoning applies to the port choice: one listener port carries exactly one
|
# reasoning applies to the port choice: one listener port carries exactly one
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
kind: Gateway
|
kind: Gateway
|
||||||
metadata:
|
metadata:
|
||||||
name: farrisilk-metabase
|
name: customer1-metabase
|
||||||
namespace: internal
|
namespace: internal
|
||||||
labels:
|
labels:
|
||||||
dedicated: network
|
dedicated: network
|
||||||
annotations:
|
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:
|
spec:
|
||||||
gatewayClassName: cilium
|
gatewayClassName: cilium
|
||||||
listeners:
|
listeners:
|
||||||
|
|
@ -12,12 +12,12 @@
|
||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
kind: Gateway
|
kind: Gateway
|
||||||
metadata:
|
metadata:
|
||||||
name: farrisilk-odoo
|
name: customer1-odoo
|
||||||
namespace: internal
|
namespace: internal
|
||||||
labels:
|
labels:
|
||||||
dedicated: network
|
dedicated: network
|
||||||
annotations:
|
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:
|
spec:
|
||||||
gatewayClassName: cilium
|
gatewayClassName: cilium
|
||||||
listeners:
|
listeners:
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
# Ports: 8081 = Grafana (`internal` Gateway listener http-internal),
|
# 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),
|
# 8085 = Metabase (`metabase` Gateway listener http-internal),
|
||||||
# 8086 = Farrisilk lab Odoo (`farrisilk-odoo` Gateway),
|
# 8086 = Customer 1 lab Odoo (`customer1-odoo` Gateway),
|
||||||
# 8087 = Farrisilk lab Metabase (`farrisilk-metabase` Gateway).
|
# 8087 = Customer 1 lab Metabase (`customer1-metabase` Gateway).
|
||||||
# Add a new internal listener port to PORTS; the loop is idempotent, so
|
# 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.
|
# re-running after a port is already firewalled only adds what is missing.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/sbin/nft -f
|
#!/usr/sbin/nft -f
|
||||||
# Internal (WireGuard-only) gateway listeners: TCP 8081 (Grafana), 8084
|
# 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).
|
# Metabase).
|
||||||
#
|
#
|
||||||
# Cilium's hostNetwork Envoy binds every Gateway listener on 0.0.0.0, so the
|
# Cilium's hostNetwork Envoy binds every Gateway listener on 0.0.0.0, so the
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,5 @@ resources:
|
||||||
- gateway.yaml
|
- gateway.yaml
|
||||||
- gateway-hubble-ui.yaml
|
- gateway-hubble-ui.yaml
|
||||||
- gateway-metabase.yaml
|
- gateway-metabase.yaml
|
||||||
- gateway-farrisilk-odoo.yaml
|
- gateway-customer1-odoo.yaml
|
||||||
- gateway-farrisilk-metabase.yaml
|
- gateway-customer1-metabase.yaml
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue