App 2.41.0, server 2.9.0: recordings reach the server
A finished signal recording goes to an outbox and is sent gzipped with
the car's token (PUT /v1/logs/{name}); the service retries every 2
minutes while the car is offline. The server keeps the newest 200 on a
new volume (LOGS_DIR); reading takes a token of its own (LOGS_TOKEN).
fetch-logs in the dev shell fetches new ones into logs/.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
+26
-1
@@ -16,6 +16,22 @@ spec:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
# The files the car sends from its Logs tab (signal recordings), read with LOGS_TOKEN. Unlike
|
||||
# the map cache these are not fetched again, so they get a volume of their own.
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mg4-server-logs
|
||||
namespace: mg4
|
||||
labels:
|
||||
app.kubernetes.io/name: mg4-server
|
||||
app.kubernetes.io/part-of: mg4
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -73,12 +89,16 @@ spec:
|
||||
value: https://tiles.openfreemap.org/planet
|
||||
- name: MAP_CACHE_DIR
|
||||
value: /var/cache/mg4-maps
|
||||
# Files from the car's Logs tab, kept on the volume below (the newest 200, at most
|
||||
# 180 days). Reading them needs LOGS_TOKEN from the Secret; empty switches reading off.
|
||||
- name: LOGS_DIR
|
||||
value: /var/lib/mg4-logs
|
||||
- name: INFLUX_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: influxdb-auth
|
||||
key: admin-token
|
||||
# INGEST_TOKEN, APPROVAL_PASSWORD, FORGE_TOKEN.
|
||||
# INGEST_TOKEN, APPROVAL_PASSWORD, FORGE_TOKEN, LOGS_TOKEN.
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: mg4-server
|
||||
@@ -107,10 +127,15 @@ spec:
|
||||
volumeMounts:
|
||||
- name: maps
|
||||
mountPath: /var/cache/mg4-maps
|
||||
- name: logs
|
||||
mountPath: /var/lib/mg4-logs
|
||||
volumes:
|
||||
- name: maps
|
||||
persistentVolumeClaim:
|
||||
claimName: mg4-server-maps
|
||||
- name: logs
|
||||
persistentVolumeClaim:
|
||||
claimName: mg4-server-logs
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
Reference in New Issue
Block a user