mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -623,6 +623,7 @@ type DeploymentValues struct {
|
||||
HTTPAddress serpent.String `json:"http_address,omitempty" typescript:",notnull"`
|
||||
AutobuildPollInterval serpent.Duration `json:"autobuild_poll_interval,omitempty"`
|
||||
JobReaperDetectorInterval serpent.Duration `json:"job_hang_detector_interval,omitempty"`
|
||||
Cluster ClusterConfig `json:"cluster,omitempty" typescript:",notnull"`
|
||||
DERP DERP `json:"derp,omitempty" typescript:",notnull"`
|
||||
Prometheus PrometheusConfig `json:"prometheus,omitempty" typescript:",notnull"`
|
||||
Pprof PprofConfig `json:"pprof,omitempty" typescript:",notnull"`
|
||||
@@ -882,6 +883,10 @@ type DERPConfig struct {
|
||||
Path serpent.String `json:"path" typescript:",notnull"`
|
||||
}
|
||||
|
||||
type ClusterConfig struct {
|
||||
Host serpent.String `json:"host" typescript:",notnull"`
|
||||
}
|
||||
|
||||
type UsageStatsConfig struct {
|
||||
Enable serpent.Bool `json:"enable" typescript:",notnull"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user