feat(trakrf-backend): wire READER_FEED_MQTT_* env for reader live-view (TRA-902)#149
Merged
mikestankavich merged 1 commit intoJun 5, 2026
Conversation
…-view (TRA-902) Final TRA-902 activation piece: deliver the reader-feed config to the backend as Deployment env vars (GitOps-durable; ArgoCD self-heals the backend, so ad-hoc `kubectl set env` would be reverted). The backend (platform #455/#456) stamps these into index.html → window.__APP_CONFIG__.readerFeed; the SPA's Live Reads tab subscribes the browser to the broker over WSS. - helm/trakrf-backend: add a `readerFeed` values block + a conditional env block (gated on readerFeed.url, mirroring the mqtt.host trigger). READER_FEED_MQTT_URL /USERNAME/TOPIC as config; READER_FEED_MQTT_PASSWORD via secretKeyRef from trakrf-mosquitto-auth/frontend_password (out of git). Off by default. - argocd/root: per-env `readerFeedEnabled` flag (preview=true, prod=false) + GKE-only inject of readerFeed.url = wss://mqtt.<env>.gke.trakrf.id:8084/mqtt. Pairs with #148 (broker WSS listener + frontend-readonly read-only ACL). The creds land in PRE-AUTH index.html (public) → least-privilege subscribe-only. prod stays off until the multi-tenant cross-org read gate is closed (TRA-902 comment). Verified: helm template — preview renders READER_FEED_MQTT_* (URL/USERNAME/TOPIC + PASSWORD secretKeyRef); default/prod/aks render none; root gke injects the preview URL only; lint + root render pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Final TRA-902 activation piece — pairs with the merged #148 (broker WSS listener +
frontend-readonlyread-only ACL).Delivers the reader-feed config to the backend as Deployment env vars (GitOps-durable — ArgoCD self-heals the backend, so ad-hoc
kubectl set envwould be reverted). The backend (platform #455/#456, merged) stampsREADER_FEED_MQTT_*intoindex.html→window.__APP_CONFIG__.readerFeed; the SPA's Live Reads tab then subscribes the browser to the broker over WSS.Changes (mirrors the
mqttEnabledpattern)helm/trakrf-backend: newreaderFeedvalues block + a conditional env block (gated onreaderFeed.url, likemqtt.host).READER_FEED_MQTT_URL/USERNAME/TOPICas config;READER_FEED_MQTT_PASSWORDviasecretKeyRef→trakrf-mosquitto-auth/frontend_password(out of git). Off by default.argocd/root: per-envreaderFeedEnabledflag (preview=true, prod=false) + GKE-only inject ofreaderFeed.url = wss://mqtt.<env>.gke.trakrf.id:8084/mqtt.Security
Creds land in pre-auth
index.html(public) → least-privilege subscribe-only (the #148 ACL allowsread trakrf.id/+/readsonly — verified). prod stays off until the multi-tenant cross-org read gate is closed (documented on TRA-902).Verification
helm template: preview renders all fourREADER_FEED_MQTT_*(incl. PASSWORDsecretKeyRef); default/prod/aks render none; root chart injects the preview URL only (prod/aks none);helm lint(eks/aks) + root render pass.Deploy
helm/ chart change → ArgoCD auto-syncs; backend rolls (
maxSurge:0, single-pod) and serves the reader-feed config. Thefrontend-readonlyuser + WSS listener are already live (#148 + activated). After merge I'll confirm the backend carries the env + ping platform to validate end-to-end (DevTools__APP_CONFIG__.readerFeed, Live Reads tab).🤖 Generated with Claude Code