11. Optional Prometheus for usage insights
- Status: Accepted
- Date: 2026-10
Context
Administrators want to see who uses what, and to spot workspaces that reserve far more than they use, or use more than they reserve. Most clusters already collect container metrics (cAdvisor) and volume metrics (kubelet). Running a metrics pipeline inside kornercode would duplicate that.
Decision
Usage insights are enabled by pointing the gateway at an existing Prometheus
(PROMETHEUS_URL). The gateway builds every query from fixed templates and
validated names, compares usage with the requests and limits in the pod
specs, and reports unknown values as unknown, never as zero. Without
Prometheus, the dashboard shows reservations only.
Consequences
- No extra component to run or secure.
- Accuracy is bounded by the scrape interval.
- Storage usage needs a storage driver that reports volume statistics; with drivers that do not (such as local-path), only capacity is shown.