Skip to content

Aggregated Watches

Timo Furrer requested to merge watch-api into master

This change set introduces a new endpoint to the Kubernetes API proxy. The API is located a <prefix>/watch and implements a new protocol on top of a WebSocket communication.

The endpoint can be used to aggregated multiple Kubernetes Watch API requests into a single WebSocket connection instead of having to handle multiple long-lived plain HTTP connections.

The protocol is named gitlab-agent-watch-api and documented in doc/watch-aggregator-api.md.

The intended user for this endpoint is the Dashboard for Kubernetes inside the GitLab UI.

Closes #541 (closed)


Open Points:

  • Tests
  • Consider defining and using a WebSocket subprotocol
  • Documentation of custom protocol
  • Cleanup here and there, but nothing major
  • Why the hell does proto-gen NOT put the json_name into the json tag ?! (see watch id in WatchRequest)
  • (optional) complete request with other fields
  • Write follow-up issue to include new metric for watches into our Grafana dashboard
  • Agentk won't shutdown when watch is open
  • Open issue in websocket package for cancelation with cause handling
Edited by Timo Furrer

Merge request reports