diff --git a/kubernetes/gr-foundry/manifests/mapache/configmap-kerbecs.yaml b/kubernetes/gr-foundry/manifests/mapache/configmap-kerbecs.yaml index 9f60375..3aa539b 100644 --- a/kubernetes/gr-foundry/manifests/mapache/configmap-kerbecs.yaml +++ b/kubernetes/gr-foundry/manifests/mapache/configmap-kerbecs.yaml @@ -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 @@ -166,6 +172,14 @@ data: strip_prefix: /api envelope: default + - name: p987 + match: + path: /api/p987/* + upstream: p987 + rewrite: + strip_prefix: /api + envelope: default + # 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 diff --git a/kubernetes/gr-foundry/manifests/mapache/kustomization.yaml b/kubernetes/gr-foundry/manifests/mapache/kustomization.yaml index 96321bc..e344c8d 100644 --- a/kubernetes/gr-foundry/manifests/mapache/kustomization.yaml +++ b/kubernetes/gr-foundry/manifests/mapache/kustomization.yaml @@ -27,6 +27,7 @@ resources: - auth.yaml - vehicle.yaml - gr26.yaml + - p987.yaml - live.yaml - query.yaml - foreman.yaml @@ -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 diff --git a/kubernetes/gr-foundry/manifests/mapache/p987.yaml b/kubernetes/gr-foundry/manifests/mapache/p987.yaml new file mode 100644 index 0000000..f34c858 --- /dev/null +++ b/kubernetes/gr-foundry/manifests/mapache/p987.yaml @@ -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 diff --git a/kubernetes/gr-foundry/manifests/mapache/vaultsecretsync.yaml b/kubernetes/gr-foundry/manifests/mapache/vaultsecretsync.yaml index 1df9ba0..2314af4 100644 --- a/kubernetes/gr-foundry/manifests/mapache/vaultsecretsync.yaml +++ b/kubernetes/gr-foundry/manifests/mapache/vaultsecretsync.yaml @@ -18,6 +18,8 @@ spec: name: vehicle - kind: Deployment name: gr26 + - kind: Deployment + name: p987 - kind: Deployment name: live - kind: Deployment