Add TeslaMate deployment for Tesla Model Y data logging #47

Merged
eblume merged 8 commits from feature/teslamate into main 2026-01-22 21:25:45 -08:00

8 commits

Author SHA1 Message Date
6b66f5d8f0 Upgrade CloudNativePG to v0.27.0 for PostgreSQL major version upgrade
CloudNativePG 1.26+ supports declarative PostgreSQL major version upgrades.
Upgrading from chart v0.23.0 (operator 1.25.0) to v0.27.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:14:43 -08:00
7dff3cb870 Upgrade PostgreSQL to 18 for TeslaMate 2.2.0 compatibility
TeslaMate 2.2.0 requires PostgreSQL 17.3+ for the 17.x series.
Upgrading to PostgreSQL 18 instead of minor version bump.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:06:10 -08:00
aa96702130 Grant teslamate user superuser for extension management
TeslaMate migrations need to create/drop PostgreSQL extensions
(cube, earthdistance) which requires superuser privileges.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:55:19 -08:00
b26f89bfce Use separate DB env vars instead of DATABASE_URL
The password contains @ characters which break URL parsing.
TeslaMate supports separate DATABASE_USER/PASS/NAME/HOST variables.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:45:19 -08:00
f49af8a292 Fix TeslaMate image tag (2.2.0 not v2.2.0)
Docker Hub uses 2.2.0 tag while GitHub release is v2.2.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:41:57 -08:00
922f63f6e7 Address PR review comments
- Use explicit TeslaMate version v2.2.0 instead of :latest
- Remove redundant "Manual sync only" comments from all app manifests

Note: borgmatic user already has pg_read_all_data role which grants
SELECT on all tables in all databases, so no grant updates needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:34:04 -08:00
5f731b677f Update secret templates to use consolidated 1Password item
Use single "TeslaMate" item with db_password and api_enc_key fields
instead of separate items.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:18:27 -08:00
07896ac412 Add TeslaMate deployment for Tesla Model Y data logging
- Add TeslaMate k8s deployment with Tailscale ingress at tesla.tail8d86e.ts.net
- Add teslamate user to CloudNativePG blumeops-pg cluster
- Add TeslaMate PostgreSQL datasource to Grafana
- Import 18 TeslaMate Grafana dashboards for charging, drives, efficiency, etc.
- Add teslamate database to borgmatic backup configuration
- Create 1Password-templated secrets for encryption key and DB credentials

Requires user action before deployment:
1. Create 1Password items: "TeslaMate DB Password" and "TeslaMate Encryption Key"
2. Apply secrets via op inject
3. Create teslamate database manually

See argocd/manifests/teslamate/README.md for deployment instructions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:11:31 -08:00