Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions kubernetes/gr-foundry/manifests/mapache/configmap-kerbecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ data:
instances:
- http://gr26.mapache.svc.cluster.local:7005

p987:
name: mapache-p987
version: 0.1.0
instances:
- http://p987.mapache.svc.cluster.local:7020

live:
name: mapache-live
version: 0.1.0
Expand Down Expand Up @@ -166,6 +172,14 @@ data:
strip_prefix: /api
envelope: default

- name: p987
match:
path: /api/p987/*
upstream: p987
rewrite:
strip_prefix: /api
envelope: default

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the p987 WebSocket upgrade

When clients connect to /api/p987/live, this catch-all applies the default response envelope, which interferes with the WebSocket upgrade and leaves the new service's live endpoint unusable through Kerbecs. The equivalent /api/gr26/live route is explicitly configured as passthrough; add a specific p987 live passthrough route before this catch-all.

Useful? React with 👍 / 👎.


# Specific WS/SSE routes need passthrough so kerbecs doesn't wrap
# the response envelope or interfere with the connection upgrade.
# The catch-all `live` route below uses default envelope for the
Expand Down
5 changes: 5 additions & 0 deletions kubernetes/gr-foundry/manifests/mapache/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ resources:
- auth.yaml
- vehicle.yaml
- gr26.yaml
- p987.yaml
- live.yaml
- query.yaml
- foreman.yaml
Expand All @@ -40,6 +41,10 @@ images:
newTag: 3.9.9
- name: ghcr.io/gaucho-racing/mapache/gr26
newTag: 3.9.9
# p987 merged after v3.9.9 so it has no release tag yet; tracks :latest
# until the next services release bumps it like the rest.
- name: ghcr.io/gaucho-racing/mapache/p987
newTag: latest
- name: ghcr.io/gaucho-racing/mapache/live
newTag: 3.9.9
- name: ghcr.io/gaucho-racing/mapache/query
Expand Down
111 changes: 111 additions & 0 deletions kubernetes/gr-foundry/manifests/mapache/p987.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# p987: telemetry ingest for the Porsche 987 (TCM-987).
#
# Same shape as gr26 but a narrower job: live path only. No foreman
# worker pool and no shelter cold-storage ingest, so no FOREMAN_ENDPOINT
# and no AWS credentials — it subscribes, decodes against the 987 signal
# definitions, writes ClickHouse, and republishes to query/live/*.
#
# MQTT uses a shared subscription ($share/p987-cluster/p987/#) so frames
# are split across replicas rather than each replica writing the same row.
#
# Pinned to :latest with Always because p987 has no release tag yet — it
# merged after v3.9.9. The next services release bumps this to a real
# version via the deploy workflow, at which point the pull policy can go.

apiVersion: apps/v1
kind: Deployment
metadata:
name: p987
namespace: mapache
spec:
replicas: 2
selector:
matchLabels:
app: p987
template:
metadata:
labels:
app: p987
spec:
topologySpreadConstraints:
- maxSkew: 1
minDomains: 2
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: p987
containers:
- name: p987
image: ghcr.io/gaucho-racing/mapache/p987:latest
imagePullPolicy: Always
ports:
- containerPort: 7020
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 1000m
memory: 1Gi
env:
- name: ENV
value: PROD
- name: PORT
value: "7020"
# Shares the mapache database with gr26; the p987_can table is
# created on first connect.
- name: CLICKHOUSE_HOST
valueFrom:
secretKeyRef:
name: mapache-secrets
key: CLICKHOUSE_HOST
- name: CLICKHOUSE_PORT
value: "9000"
- name: CLICKHOUSE_USER
valueFrom:
secretKeyRef:
name: mapache-secrets
key: CLICKHOUSE_USER
- name: CLICKHOUSE_DATABASE
value: mapache
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: mapache-secrets
key: CLICKHOUSE_PASSWORD
- name: KERBECS_ENDPOINT
value: http://kerbecs.mapache.svc.cluster.local:10300
- name: KERBECS_USER
value: admin
- name: KERBECS_PASSWORD
valueFrom:
secretKeyRef:
name: mapache-secrets
key: KERBECS_PASSWORD
- name: MQTT_HOST
value: gr-mqtt.gauchoracing.com
- name: MQTT_PORT
value: "1883"
- name: MQTT_USER
valueFrom:
secretKeyRef:
name: mapache-secrets
key: MQTT_USER
- name: MQTT_PASSWORD
valueFrom:
secretKeyRef:
name: mapache-secrets
key: MQTT_PASSWORD
---
apiVersion: v1
kind: Service
metadata:
name: p987
namespace: mapache
spec:
selector:
app: p987
ports:
- port: 7020
targetPort: 7020
2 changes: 2 additions & 0 deletions kubernetes/gr-foundry/manifests/mapache/vaultsecretsync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ spec:
name: vehicle
- kind: Deployment
name: gr26
- kind: Deployment
name: p987
- kind: Deployment
name: live
- kind: Deployment
Expand Down