fix: enable FeatureHighAvailability if it is licensed (#10834)

fixes #10810

The tailnet coordinators don't depend on replicasync, so we can still enable HA coordinators even if the relay URL is unset.

The in-memory, non-HA coordinator probably has lower latency than the PG Coordinator, since we have to query the database, so enterprise customers might want to disable it for single-replica deployments, but this PR default-enables the HA coordinator.  We could add support later to disable it if anyone complains. Latency setting up connections matters, but I don't believe the coordinator contributes significantly at this point for reasonable postgres round-trip-time.
This commit is contained in:
Spike Curtis
2023-11-22 14:46:55 +04:00
committed by GitHub
parent 8dd003ba5e
commit 89c13c2212
2 changed files with 1 additions and 1 deletions
+1
View File
@@ -95,6 +95,7 @@ func (n FeatureName) AlwaysEnable() bool {
FeatureExternalProvisionerDaemons: true,
FeatureAppearance: true,
FeatureWorkspaceBatchActions: true,
FeatureHighAvailability: true,
}[n]
}
-1
View File
@@ -472,7 +472,6 @@ func (api *API) updateEntitlements(ctx context.Context) error {
codersdk.FeatureAuditLog: api.AuditLogging,
codersdk.FeatureBrowserOnly: api.BrowserOnly,
codersdk.FeatureSCIM: len(api.SCIMAPIKey) != 0,
codersdk.FeatureHighAvailability: api.DERPServerRelayAddress != "",
codersdk.FeatureMultipleExternalAuth: len(api.ExternalAuthConfigs) > 1,
codersdk.FeatureTemplateRBAC: api.RBAC,
codersdk.FeatureExternalTokenEncryption: len(api.ExternalTokenEncryption) > 0,