How it works
The server exposes two HTTP endpoints:| Endpoint | Purpose |
|---|---|
/ws | WebSocket upgrade endpoint |
/health | Liveness check |
Protocol
All messages are JSON-encoded with this base structure:Message types
| Type | Direction | Purpose |
|---|---|---|
subscribe | Client -> Server | Subscribe to a topic |
unsubscribe | Client -> Server | Unsubscribe from a topic |
request | Client -> Server | Request data |
event | Server -> Client | Push event notification |
response | Server -> Client | Response to a request |
error | Server -> Client | Error response |
Topics
| Topic | Description |
|---|---|
personas | ApplicationPersona changes |
cluster | ClusterPersona state changes |
deployments | Deployment changes |
events | General Kubernetes events |
Subscribing to topics
Send asubscribe message to receive events for a topic:
unsubscribe message with the same topic.
Requesting data
List personas
namespace field in the payload is optional. If omitted, personas from all namespaces are returned.
Get cluster info
name is omitted, the first ClusterPersona found is returned.
Event types
PersonaEvent
Broadcast when an ApplicationPersona changes:created, updated, deleted
ClusterEvent
Broadcast when cluster state changes:updated, nodeAdded, nodeRemoved
ValidationEvent
Broadcast when validation results change:Connection management
| Parameter | Value |
|---|---|
| Max message size | 512 KB |
| Ping interval | 30 seconds |
| Write timeout | 10 seconds |
| Read timeout | 60 seconds |
| Send buffer | 256 messages per client |
Configuration
Via Helm
Via CLI flag
CLI usage
The dorgu CLI connects to the WebSocket server automatically when available:Configuration
WebSocket configuration options
Helm values
WebSocket Helm chart values