## Summary - 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 ## Deployment and Testing - [ ] Create 1Password items: "TeslaMate DB Password" and "TeslaMate Encryption Key" - [ ] Apply database user secret: `op inject -i argocd/manifests/databases/secret-teslamate.yaml.tpl | kubectl apply -f -` - [ ] Sync blumeops-pg: `argocd app sync blumeops-pg` - [ ] Create teslamate database - [ ] Apply teslamate secrets (encryption key, db connection) - [ ] Apply Grafana datasource secret: `op inject -i argocd/manifests/grafana-config/secret-teslamate-datasource.yaml.tpl | kubectl apply -f -` - [ ] Sync apps and teslamate: `argocd app sync apps teslamate grafana grafana-config` - [ ] Complete Tesla API OAuth flow at https://tesla.tail8d86e.ts.net - [ ] Verify data collection starts - [ ] Verify Grafana dashboards show data 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://forge.tail8d86e.ts.net/eblume/blumeops/pulls/47
91 lines
2.2 KiB
YAML
91 lines
2.2 KiB
YAML
# Grafana Helm values for blumeops
|
|
# Chart: https://github.com/grafana/helm-charts/tree/main/charts/grafana
|
|
|
|
# Admin credentials from pre-created secret
|
|
# Secret must exist before deploying - see grafana-config/README.md
|
|
admin:
|
|
existingSecret: grafana-admin
|
|
userKey: admin-user
|
|
passwordKey: admin-password
|
|
|
|
# Environment variables from secrets (for datasource credentials)
|
|
envFromSecrets:
|
|
- name: grafana-teslamate-datasource
|
|
optional: true
|
|
|
|
# Persistence with PVC for SQLite database
|
|
persistence:
|
|
enabled: true
|
|
type: pvc
|
|
size: 1Gi
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
|
|
# Grafana configuration via grafana.ini
|
|
grafana.ini:
|
|
server:
|
|
root_url: https://grafana.tail8d86e.ts.net
|
|
analytics:
|
|
check_for_updates: false
|
|
reporting_enabled: false
|
|
|
|
# Datasources - point to k8s-internal services
|
|
datasources:
|
|
datasources.yaml:
|
|
apiVersion: 1
|
|
datasources:
|
|
- name: Prometheus
|
|
type: prometheus
|
|
access: proxy
|
|
orgId: 1
|
|
uid: prometheus
|
|
url: http://prometheus.monitoring.svc.cluster.local:9090
|
|
isDefault: true
|
|
editable: false
|
|
- name: Loki
|
|
type: loki
|
|
access: proxy
|
|
orgId: 1
|
|
uid: loki
|
|
url: http://loki.monitoring.svc.cluster.local:3100
|
|
editable: false
|
|
- name: TeslaMate
|
|
type: postgres
|
|
access: proxy
|
|
orgId: 1
|
|
uid: TeslaMate
|
|
url: blumeops-pg-rw.databases.svc.cluster.local:5432
|
|
database: teslamate
|
|
user: teslamate
|
|
editable: false
|
|
jsonData:
|
|
sslmode: disable
|
|
maxOpenConns: 5
|
|
maxIdleConns: 2
|
|
connMaxLifetime: 14400
|
|
secureJsonData:
|
|
password: $TESLAMATE_DB_PASSWORD
|
|
|
|
# Dashboard provisioning - sidecar watches for ConfigMaps with label
|
|
sidecar:
|
|
dashboards:
|
|
enabled: true
|
|
label: grafana_dashboard
|
|
labelValue: "1"
|
|
folderAnnotation: grafana_folder
|
|
provider:
|
|
foldersFromFilesStructure: false
|
|
|
|
# Service configuration (Ingress will handle external access)
|
|
service:
|
|
type: ClusterIP
|
|
port: 80
|
|
|
|
# Resource limits for minikube
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|