Skip to main content
The operator includes an optional WebSocket server that enables real-time communication with the dorgu CLI. It provides live persona and cluster state updates via a topic-based pub/sub protocol.

How it works

The server exposes two HTTP endpoints:

Protocol

All messages are JSON-encoded with this base structure:

Message types

Topics

Subscribing to topics

Send a subscribe message to receive events for a topic:
The server confirms with:
To stop receiving events, send an unsubscribe message with the same topic.

Requesting data

List personas

Response:
The namespace field in the payload is optional. If omitted, personas from all namespaces are returned.

Get cluster info

Response:
If name is omitted, the first ClusterPersona found is returned.

Event types

PersonaEvent

Broadcast when an ApplicationPersona changes:
Event types: created, updated, deleted

ClusterEvent

Broadcast when cluster state changes:
Event types: updated, nodeAdded, nodeRemoved

ValidationEvent

Broadcast when validation results change:

Connection management

The server uses non-blocking broadcast — if a client’s send buffer is full, the message is dropped for that client rather than blocking other clients.

Configuration

Via Helm

When enabled, the Helm chart creates a ClusterIP Service on the specified port.

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