chore: modify replicasync to handle NATS explicitly (#26666)

relates to GRU-69

Modifies replicasync to handle discovering NATS enabled primary replicas explicitly, and passing that info to the NATS Pubsub.

This PR adds a new deployment value to explicitly represent the host or IP that the replica can be reached on. It isn't wired up to the CLI, but piggybacks on the DERP config for now.

We learn the NATS port directly from NATS at runtime, and propagate it thru replicasync to learn all peers for clustering.
This commit is contained in:
Spike Curtis
2026-06-26 08:36:32 -04:00
committed by GitHub
parent 9f211ce5ae
commit 98e1ce133c
16 changed files with 219 additions and 132 deletions
+6
View File
@@ -3267,6 +3267,11 @@ export interface ChatWorkspaceTTLResponse {
readonly workspace_ttl_ms: number;
}
// From codersdk/deployment.go
export interface ClusterConfig {
readonly host: string;
}
// From codersdk/client.go
/**
* CoderDesktopTelemetryHeader contains a JSON-encoded representation of Desktop telemetry
@@ -4282,6 +4287,7 @@ export interface DeploymentValues {
readonly http_address?: string;
readonly autobuild_poll_interval?: number;
readonly job_hang_detector_interval?: number;
readonly cluster?: ClusterConfig;
readonly derp?: DERP;
readonly prometheus?: PrometheusConfig;
readonly pprof?: PprofConfig;