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.
106 lines
3.1 KiB
YAML
106 lines
3.1 KiB
YAML
# 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
|