mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-12 23:54:01 +09:00
Tenants get a way to read their namespace's logs without Grafana and without reaching vlselect directly, which would give them neither an RBAC check nor a forced scope. The handler authenticates, authorizes from the path, rebuilds the upstream request with fixed tenant headers and no client headers, and returns VictoriaLogs' native response. A live tail is flushed after every line, is not subject to the request timeout, and is closed once idle, so it survives far past the apiserver request timeout without leaving forgotten browser tabs holding streams open. An unreachable store answers 502 so the dashboard can tell an outage from an empty result. Assisted-by: LLM Signed-off-by: ZverGuy <maximbel2003@gmail.com>