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.
87 lines
2.9 KiB
YAML
87 lines
2.9 KiB
YAML
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:
|
|
# 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
|