homek8s/apps/base/customer1/metabase.yaml
Lance Walters ae22aab330 apps(customer1): anonymize client name — farrisilk -> customer1
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.
2026-11-24 01:46:25 -05:00

108 lines
3.2 KiB
YAML

# Metabase for the lab replica — its own state in the SAME plain Postgres
# (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
# 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
# `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: customer1
spec:
# Parked 2026-11-22 (power budget) — see apps/base/customer1/odoo.yaml.
replicas: 0
selector:
matchLabels:
app: metabase
template:
metadata:
labels:
app: metabase
app.kubernetes.io/part-of: customer1
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.customer1.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:
# Capped with the main Metabase: see apps/base/metabase/deployment.yaml
cpu: "1"
memory: 2Gi
---
apiVersion: v1
kind: Service
metadata:
name: metabase
namespace: customer1
spec:
type: ClusterIP
selector:
app: metabase
ports:
- name: http
port: 3000
targetPort: http
protocol: TCP