-
Notifications
You must be signed in to change notification settings - Fork 0
feat(foundry): deploy the p987 telemetry ingest service #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/liveroute is explicitly configured aspassthrough; add a specific p987 live passthrough route before this catch-all.Useful? React with 👍 / 👎.