Repository navigation
✨ deploy: headless Twitch streamer for the Activity Monitor - #15595
Conversation
Adds src/deploy/stream: a Debian image (Xvfb + Chromium + ffmpeg + a stdlib Go authproxy that injects Authorization: Bearer so the token never reaches the URL, history, logs or screen), an entrypoint that supervises every process with backoff, reloads the page every RELOAD_EVERY, encodes 1080p30 libx264 CBR with a silent audio track and pushes to Twitch RTMP, a healthcheck, docker compose, a Kustomize base in a dedicated hive-stream namespace and the hive-hosted overlay for hive's own spoke on hive-oke. Secrets are templates only; the owner creates them. Dashboard: `?kiosk=1` unattended display mode — hides sidebar, topbar (out-specifying theme.go's layout guard), avatar menu, notices, chat FAB, welcome/NPS dialogs and every section except the Activity Monitor, and skips the toast hover-pause. Guarded by TestKioskModeWiring. Publishing: .github/workflows/stream-image.yml pushes ghcr.io/hivecommons/hive-stream:<sha> and :v5-latest from v5 (PR builds only), registered as pinned [-v4] in release-lines.yml. Docs: src/docs/streaming-the-activity-monitor.md (Twitch Creator Dashboard steps, secrets, apply, verify, troubleshooting, privacy, OBS quick path). Fixes #15594 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
TestNavbarStickyThreeZoneLayout scans every `.oc-topbar {` rule and
requires its display to be grid; the kiosk override (and its comment)
matched. Use `html body.kiosk-mode #oc-topbar[id]` instead — still
(1,2,2), still beats theme.go's layout guard — and reword the comment.
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
17ad060
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15594
What
An unattended 24/7 Twitch stream of the dashboard's Activity Monitor for hive's own hosted spoke on
hive-oke. Code + docs + a local dry run only: no cluster or Twitch changes — the owner creates the two Secrets and applies the overlay.src/deploy/stream/—Dockerfile(debian slim: Xvfb, Chromium, ffmpeg, xdotool, tini; Go stage buildsauthproxy),entrypoint.sh(Xvfb → authproxy → Chromium--kioskwith backoff → reload everyRELOAD_EVERY→ ffmpeg x11grab 1080p30 +anullsrc, libx264 veryfast 4500k CBR keyint 60 →rtmp://live.twitch.tv/app/$KEY; key masked in logs;STREAM_OUTPUT/STREAM_SECONDSdry-run modes),healthcheck.sh,docker-compose.yaml,authproxy/(stdlib reverse proxy injectingAuthorization: Bearer $DASHBOARD_TOKEN; the token never reaches the URL, history, logs or screen; tests included).hive-streamnamespace (the hub provisioner owns the hosted spoke's namespace and deletes it wholesale, so nothing foreign should live there): Deployment (1 replica, non-root, drop-ALL, 512 Mi/dev/shm, 1–2 CPU / 2–3 Gi, exec probes), ConfigMap, NetworkPolicy (DNS, dashboard Service, public RTMP/HTTPS only), Secret templates;overlays/hive-hostedpoints athive.hive-hosted-hosted-available-oke-11-placeholder-r05x.svc.cluster.local:3002and uses the spoke's sharedhive-secrets/dashboard-token(valid because the hive ishub_proxied).?kiosk=1— hides sidebar, topbar (must out-specifytheme.go'sbody #oc-topbar.oc-topbar{display:grid!important}layout guard), avatar/settings, notices, chat FAB, Welcome and NPS dialogs, every non-tracker section; skips toast hover-pause; nothing persisted.TestKioskModeWiringguards the wiring;index.htmlregenerated..github/workflows/stream-image.yml: PR builds only; push tov5(path-filtered) pushesghcr.io/hivecommons/hive-stream:<sha>and:v5-latest; registered[-v4]inrelease-lines.yml(guard passes).src/docs/streaming-the-activity-monitor.md(Twitch Creator Dashboard steps, secrets, apply, verify, troubleshooting, privacy, OBS quick path),src/deploy/stream/README.md, deploy README + documentation map entries, changelog fragment.Dry run
Image built locally with Docker (colima) and run against the live hive's-hive dashboard (via
kubectl port-forward, in-cluster bearer token; a small local server served this branch's regeneratedindex.htmlfor/and proxied the API, since the live spoke still runs the pre-kiosk SPA).STREAM_OUTPUT=/out/kiosk.flv STREAM_SECONDS=30→ ffmpeg encoded 30 s,healthcheck.sh→ok frames=…, reload fired. Frame at t=25 s:No tokens or secrets render on the tracker page; it shows public-repo PR/issue titles and authors only.
Also found and fixed while dry-running: ffmpeg lacked
-y(an existing FLV sink made it exit immediately and|| truehid it) and the bounded run reported success regardless of ffmpeg's exit — the bounded run now fails on a non-zero exit.Owner steps after merge