Migrate paperless, teslamate, and mealie off the OOM-saturated minikube-indri node onto ringtail k3s, shedding ~1.1 GiB of resident load. Second chain in the indri-k8s decommission after immich. **Containers ported to Nix (default.nix), build-verified on ringtail:** - paperless → wraps nixpkgs paperless-ngx 2.20.15 (pinned unstable); runs as web/worker/beat/consumer - mealie → wraps nixpkgs mealie 3.16.0 (forward 4-minor bump, breaking-change reviewed); single gunicorn, SQLite - teslamate → from-scratch beamPackages mixRelease (not in nixpkgs); erlang_27+elixir_1_18, npm assets, ex_cldr locales pre-fetched **Data:** cold downtime-tolerant cutover. paperless+teslamate postgres dump/restore from quiesced source into a new ringtail blumeops-pg CNPG cluster; mealie SQLite PVC copied. Source DBs untouched until verified (rollback = repoint). **Also:** ringtail blumeops-pg cluster + ExternalSecrets scaffold; fixes pre-existing shower version-check drift. Runbook: docs/how-to/ringtail/migrate-wave1-ringtail.md. Deploy-from-branch + cutover happens before merge; container images rebuilt from main after merge. Reviewed-on: #363
72 lines
2.1 KiB
YAML
72 lines
2.1 KiB
YAML
# TeslaMate on ringtail k3s — Nix image.
|
|
#
|
|
# The Nix image's Entrypoint waits for postgres, runs migrations
|
|
# (TeslaMate.Release.migrate), then starts the release — so no command
|
|
# override is needed. Stateless; all data lives in the teslamate database
|
|
# on the ringtail blumeops-pg (DATABASE_HOST already an in-cluster name,
|
|
# unchanged from minikube). See [[migrate-wave1-ringtail]].
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: teslamate
|
|
namespace: teslamate
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: teslamate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: teslamate
|
|
spec:
|
|
securityContext:
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: teslamate
|
|
image: registry.ops.eblu.me/blumeops/teslamate:kustomized
|
|
ports:
|
|
- containerPort: 4000
|
|
env:
|
|
- name: DATABASE_USER
|
|
value: "teslamate"
|
|
- name: DATABASE_PASS
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: teslamate-db
|
|
key: password
|
|
- name: DATABASE_NAME
|
|
value: "teslamate"
|
|
- name: DATABASE_HOST
|
|
value: "blumeops-pg-rw.databases.svc.cluster.local"
|
|
- name: ENCRYPTION_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: teslamate-encryption
|
|
key: key
|
|
- name: DISABLE_MQTT
|
|
value: "true"
|
|
- name: CHECK_ORIGIN
|
|
value: "false"
|
|
- name: TZ
|
|
value: "America/Los_Angeles"
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 4000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 4000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|