Skip to content

Stream a running app deployment's console logs to the customer over WebSocket #326

Description

@v0l

Problem

Customers can see a deployment's derived lifecycle status, but nothing of its runtime console output (stdout/stderr) — no way to see why an app is misbehaving short of asking us. Part of the App Deployments epic (#45).

Wanted

A customer-facing endpoint that streams a running deployment's container log output live over WebSocket, scoped to the owning customer only.

Starting points, not a mandate

  • lnvps_operator already depends on kube/k8s-openapi (Cargo.toml) and reconciles each deployment in its own app-<id> namespace (per Operator cannot list pods in app-N namespaces, so the workload health read added in #276 never runs #293) — the Kubernetes API's pod log stream (Api<Pod>::log_stream) is the natural source, no new dependency needed.
  • lnvps_api_admin/src/admin/websocket.rs (admin_job_feedback_websocket) is an existing WebSocket precedent in this codebase (axum WebSocketUpgrade, per-connection auth, forward a stream to the socket) — different source (Redis pub/sub, not pod logs), but the connection/auth shape is there to follow.
  • A multi-container service (compose can declare several) needs a container selector, not just a deployment id.

Not settled here

Retention/scrollback (live tail only vs. some history), and whether the web UI change lands in the same pass or as a follow-up once the endpoint's contract is set.

-- PM: Alejandra

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiUser-facing or admin API changesenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions