Skip to content

Commit 837f6bd

Browse files
Greg Maslowskiclaude
andcommitted
README: top Buy Me a Coffee badge, Helm sample, config accuracy
- Add Buy Me a Coffee badge to the top badge row. - Add a self-contained Helm (Kubernetes) deployment sample. - Clarify TC_REDACT_HOME is parsed/exposed but not yet enforced; rest of the config table verified against the code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 13c8113 commit 837f6bd

1 file changed

Lines changed: 101 additions & 1 deletion

File tree

README.md

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![CI](https://github.com/gmaslowski/teslamate-dash/actions/workflows/ci.yml/badge.svg)](https://github.com/gmaslowski/teslamate-dash/actions/workflows/ci.yml)
44
[![Docker](https://github.com/gmaslowski/teslamate-dash/actions/workflows/docker.yml/badge.svg)](https://github.com/gmaslowski/teslamate-dash/actions/workflows/docker.yml)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6+
[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-gmaslowski-FFDD00?logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/gmaslowski)
67

78
A small, self-hosted, **read-only dashboard for [TeslaMate](https://github.com/teslamate-org/teslamate)**.
89
It connects to your existing TeslaMate Postgres database and renders a clean, map-first view of your
@@ -97,6 +98,105 @@ GRANT SELECT ON ALL TABLES IN SCHEMA public TO teslamate_ro;
9798
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO teslamate_ro;
9899
```
99100

101+
### Deploy with Helm (Kubernetes)
102+
103+
A minimal self-contained chart. Create a `teslamate-dash/` directory with these four files:
104+
105+
`teslamate-dash/Chart.yaml`
106+
107+
```yaml
108+
apiVersion: v2
109+
name: teslamate-dash
110+
description: Read-only dashboard for TeslaMate
111+
type: application
112+
version: 0.1.0
113+
appVersion: "0.1.0"
114+
```
115+
116+
`teslamate-dash/values.yaml`
117+
118+
```yaml
119+
image:
120+
repository: ghcr.io/gmaslowski/teslamate-dash
121+
tag: "0.1.0"
122+
service:
123+
port: 4001
124+
# Non-secret settings (reuses TeslaMate's DATABASE_* names).
125+
env:
126+
DATABASE_HOST: teslamate-db
127+
DATABASE_NAME: teslamate
128+
DATABASE_USER: teslamate_ro
129+
TC_UNITS: km
130+
# DB password is read from an existing Secret (create it separately, see below).
131+
dbPasswordSecret:
132+
name: teslamate-dash-db
133+
key: password
134+
```
135+
136+
`teslamate-dash/templates/deployment.yaml`
137+
138+
```yaml
139+
apiVersion: apps/v1
140+
kind: Deployment
141+
metadata:
142+
name: {{ .Release.Name }}
143+
spec:
144+
replicas: 1
145+
selector:
146+
matchLabels: { app: {{ .Release.Name }} }
147+
template:
148+
metadata:
149+
labels: { app: {{ .Release.Name }} }
150+
spec:
151+
containers:
152+
- name: teslamate-dash
153+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
154+
ports:
155+
- containerPort: 4001
156+
env:
157+
{{- range $k, $v := .Values.env }}
158+
- name: {{ $k }}
159+
value: {{ $v | quote }}
160+
{{- end }}
161+
- name: DATABASE_PASS
162+
valueFrom:
163+
secretKeyRef:
164+
name: {{ .Values.dbPasswordSecret.name }}
165+
key: {{ .Values.dbPasswordSecret.key }}
166+
readinessProbe:
167+
httpGet: { path: /, port: 4001 }
168+
securityContext:
169+
runAsNonRoot: true
170+
allowPrivilegeEscalation: false
171+
readOnlyRootFilesystem: true
172+
capabilities: { drop: ["ALL"] }
173+
```
174+
175+
`teslamate-dash/templates/service.yaml`
176+
177+
```yaml
178+
apiVersion: v1
179+
kind: Service
180+
metadata:
181+
name: {{ .Release.Name }}
182+
spec:
183+
selector: { app: {{ .Release.Name }} }
184+
ports:
185+
- port: {{ .Values.service.port }}
186+
targetPort: 4001
187+
```
188+
189+
Create the DB password Secret, then install (use the read-only role from above):
190+
191+
```bash
192+
kubectl create secret generic teslamate-dash-db --from-literal=password='secret'
193+
helm install teslamate-dash ./teslamate-dash
194+
# reach it: kubectl port-forward svc/teslamate-dash 4001:4001
195+
```
196+
197+
Add an Ingress (or set `service.type: LoadBalancer`) to expose it beyond the cluster. For SSL to the
198+
database, set `TC_DSN` under `env` instead of the `DATABASE_*` parts.
199+
100200
### Not using Docker?
101201

102202
Any reachable Postgres works. For a database that lives elsewhere (a remote host, a Kubernetes
@@ -120,7 +220,7 @@ All configuration is via environment variables. `TC_`-prefixed names override th
120220
| `TC_TITLE` | `TeslaMate Dash` | Header title |
121221
| `TC_MAP_STYLE_URL` | OpenFreeMap Positron | MapLibre style URL. Point at your own tiles for full privacy. |
122222
| `TC_DOWNSAMPLE` | `4` | Keep every Nth GPS point when drawing routes (higher is lighter) |
123-
| `TC_REDACT_HOME` | `true` | Reserved for hiding the home area in shareable views (not yet applied) |
223+
| `TC_REDACT_HOME` | `true` | Reserved flag for hiding the home area in shareable views. Parsed and exposed on `/api/config`, but not yet enforced, so it currently has no visible effect. |
124224
| `TC_DEMO` | auto | Force synthetic data on or off |
125225

126226
## Privacy

0 commit comments

Comments
 (0)