Skip to content

feat: support nested structs, structured arrays, and better secret value handling in config #4727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Oct 25, 2022
Prev Previous commit
Next Next commit
make tests pass
  • Loading branch information
f0ssel committed Oct 24, 2022
commit 429f91be806ef4fe3e1e0b01abd662ccbd1b1a87
18 changes: 9 additions & 9 deletions codersdk/deploymentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type DeploymentConfig struct {
ProxyTrustedOrigins *DeploymentConfigField[[]string] `json:"proxy_trusted_origin"`
CacheDirectory *DeploymentConfigField[string] `json:"cache_directory"`
InMemoryDatabase *DeploymentConfigField[bool] `json:"in_memory_database"`
ProvisionerDaemons *DeploymentConfigField[int] `json:"provisioner_daemon_count"`
ProvisionerDaemons *DeploymentConfigField[int] `json:"provisioner_daemons"`
PostgresURL *DeploymentConfigField[string] `json:"pg_connection_url"`
OAuth2 *OAuth2Config `json:"oauth2"`
OIDC *OIDCConfig `json:"oidc"`
Expand All @@ -47,12 +47,12 @@ type DERP struct {
}

type DERPServerConfig struct {
Enable *DeploymentConfigField[bool] `json:"enabled"`
Enable *DeploymentConfigField[bool] `json:"enable"`
RegionID *DeploymentConfigField[int] `json:"region_id"`
RegionCode *DeploymentConfigField[string] `json:"region_code"`
RegionName *DeploymentConfigField[string] `json:"region_name"`
STUNAddresses *DeploymentConfigField[[]string] `json:"stun_address"`
RelayURL *DeploymentConfigField[string] `json:"relay_address"`
STUNAddresses *DeploymentConfigField[[]string] `json:"stun_addresses"`
RelayURL *DeploymentConfigField[string] `json:"relay_url"`
}

type DERPConfig struct {
Expand All @@ -61,12 +61,12 @@ type DERPConfig struct {
}

type PrometheusConfig struct {
Enable *DeploymentConfigField[bool] `json:"enabled"`
Enable *DeploymentConfigField[bool] `json:"enable"`
Address *DeploymentConfigField[string] `json:"address"`
}

type PprofConfig struct {
Enable *DeploymentConfigField[bool] `json:"enabled"`
Enable *DeploymentConfigField[bool] `json:"enable"`
Address *DeploymentConfigField[string] `json:"address"`
}

Expand All @@ -93,17 +93,17 @@ type OIDCConfig struct {
}

type TelemetryConfig struct {
Enable *DeploymentConfigField[bool] `json:"enabled"`
Enable *DeploymentConfigField[bool] `json:"enable"`
Trace *DeploymentConfigField[bool] `json:"trace"`
URL *DeploymentConfigField[string] `json:"url"`
}

type TLSConfig struct {
Enable *DeploymentConfigField[bool] `json:"enable"`
CertFiles *DeploymentConfigField[[]string] `json:"cert_files"`
CertFiles *DeploymentConfigField[[]string] `json:"cert_file"`
ClientAuth *DeploymentConfigField[string] `json:"client_auth"`
ClientCAFile *DeploymentConfigField[string] `json:"client_ca_file"`
KeyFiles *DeploymentConfigField[[]string] `json:"key_files"`
KeyFiles *DeploymentConfigField[[]string] `json:"key_file"`
MinVersion *DeploymentConfigField[string] `json:"min_version"`
}

Expand Down