@@ -11,86 +11,86 @@ import (
11
11
12
12
type DeploymentConfig struct {
13
13
// Usage: External URL to access your deployment. This must be accessible by all provisioned workspaces.
14
- // Flag: " access-url"
14
+ // Flag: access-url
15
15
AccessURL string `mapstructure:"access_url"`
16
16
// Usage: Specifies the wildcard hostname to use for workspace applications in the form "*.example.com".
17
- // Flag: " wildcard-access-url"
17
+ // Flag: wildcard-access-url
18
18
WildcardAccessURL string `mapstructure:"wildcard_access_url"`
19
19
// Usage: Bind address of the server.
20
- // Flag: " address"
21
- // Shorthand: "a"
20
+ // Flag: address
21
+ // Shorthand: a
22
22
// Default: "127.0.0.1:3000"
23
23
Address string `mapstructure:"address"`
24
24
// Usage: Interval to poll for scheduled workspace builds.
25
- // Flag: " autobuild-poll-interval"
25
+ // Flag: autobuild-poll-interval
26
26
// Hidden: true
27
27
// Default: time.Minute
28
28
AutobuildPollInterval time.Duration `mapstructure:"autobuild_poll_interval"`
29
29
DERP DERPConfig `mapstructure:"derp"`
30
30
Prometheus PrometheusConfig `mapstructure:"prometheus"`
31
31
Pprof PprofConfig `mapstructure:"pprof"`
32
32
// Usage: The directory to cache temporary files. If unspecified and $CACHE_DIRECTORY is set, it will be used for compatibility with systemd.
33
- // Flag: " cache-dir"
33
+ // Flag: cache-dir
34
34
// Default: defaultCacheDir()
35
35
CacheDir string `mapstructure:"cache_dir"`
36
36
// Usage: Controls whether data will be stored in an in-memory database.
37
- // Flag: " in-memory"
37
+ // Flag: in-memory
38
38
// Hidden: true
39
39
InMemoryDatabase bool `mapstructure:"in_memory_database"`
40
40
// Usage: Number of provisioner daemons to create on start. If builds are stuck in queued state for a long time, consider increasing this.
41
- // Flag: " provisioner-daemons"
41
+ // Flag: provisioner-daemons
42
42
// Default: 3
43
43
ProvisionerDaemonCount int `mapstructure:"provisioner_daemon_count"`
44
44
// Usage: URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root. Access the built-in database with "coder server postgres-builtin-url".
45
- // Flag: " postgres-url"
45
+ // Flag: postgres-url
46
46
PostgresURL string `mapstructure:"postgres_url"`
47
47
OAuth2Github OAuth2GithubConfig `mapstructure:"oauth2_github"`
48
48
OIDC OIDCConfig `mapstructure:"oidc"`
49
49
Telemetry TelemetryConfig `mapstructure:"telemetry"`
50
50
TLS TLSConfig `mapstructure:"tls_config"`
51
51
// Usage: Whether application tracing data is collected.
52
- // Flag: " trace"
52
+ // Flag: trace
53
53
TraceEnable bool `mapstructure:"trace_enable"`
54
54
// Usage: Controls if the 'Secure' property is set on browser session cookies.
55
- // Flag: " secure-auth-cookie"
55
+ // Flag: secure-auth-cookie
56
56
SecureAuthCookie bool `mapstructure:"secure_auth_cookie"`
57
57
// Usage: The algorithm to use for generating ssh keys. Accepted values are "ed25519", "ecdsa", or "rsa4096".
58
- // Flag: " ssh-keygen-algorithm"
58
+ // Flag: ssh-keygen-algorithm
59
59
// Default: "ed25519"
60
60
SSHKeygenAlgorithm string `mapstructure:"ssh_keygen_algorithm"`
61
61
// Usage: Templates to auto-import. Available auto-importable templates are: kubernetes
62
- // Flag: " auto-import-template"
62
+ // Flag: auto-import-template
63
63
// Hidden: true
64
64
AutoImportTemplates []string `mapstructure:"auto_import_templates"`
65
65
// Usage: How frequently metrics are refreshed
66
- // Flag: " metrics-cache-refresh-interval"
66
+ // Flag: metrics-cache-refresh-interval
67
67
// Hidden: true
68
68
// Default: time.Hour
69
69
MetricsCacheRefreshInterval time.Duration `mapstructure:"metrics_cache_refresh_interval"`
70
70
// Usage: How frequently agent stats are recorded
71
- // Flag: " agent-stats-refresh-interval"
71
+ // Flag: agent-stats-refresh-interval
72
72
// Hidden: true
73
73
// Default: 10 * time.Minute
74
74
AgentStatRefreshInterval time.Duration `mapstructure:"agent_stat_refresh_interval"`
75
75
// Usage: Enables verbose logging.
76
- // Flag: " verbose"
77
- // Shorthand: "v"
76
+ // Flag: verbose
77
+ // Shorthand: v
78
78
Verbose bool `mapstructure:"verbose"`
79
79
// Usage: Specifies whether audit logging is enabled.
80
- // Flag: " audit-logging"
80
+ // Flag: audit-logging
81
81
// Default: true
82
82
// Enterprise: true
83
83
AuditLogging bool `mapstructure:"audit_logging"`
84
84
// Usage: Whether Coder only allows connections to workspaces via the browser.
85
- // Flag: " browser-only"
85
+ // Flag: browser-only
86
86
// Enterprise: true
87
87
BrowserOnly bool `mapstructure:"browser_only"`
88
88
// Usage: Enables SCIM and sets the authentication header for the built-in SCIM server. New users are automatically created with OIDC authentication.
89
- // Flag: " scim-auth-header"
89
+ // Flag: scim-auth-header
90
90
// Enterprise: true
91
91
SCIMAuthHeader string `mapstructure:"scim_auth_header"`
92
92
// Usage: Enables and sets a limit on how many workspaces each user can create.
93
- // Flag: " user-workspace-quota"
93
+ // Flag: user-workspace-quota
94
94
// Enterprise: true
95
95
UserWorkspaceQuota int `mapstructure:"user_workspace_quota"`
96
96
}
@@ -101,135 +101,135 @@ type DERPConfig struct {
101
101
}
102
102
type DERPServerConfig struct {
103
103
// Usage: Whether to enable or disable the embedded DERP relay server.
104
- // Flag: " derp-server-enable"
104
+ // Flag: derp-server-enable
105
105
// Default: true
106
106
Enable bool `mapstructure:"enabled"`
107
107
// Usage: Region ID to use for the embedded DERP server.
108
- // Flag: " derp-server-region-id"
108
+ // Flag: derp-server-region-id
109
109
// Default: 999
110
110
RegionID int `mapstructure:"region_id"`
111
111
// Usage: Region code to use for the embedded DERP server.
112
- // Flag: " derp-server-region-code"
112
+ // Flag: derp-server-region-code
113
113
// Default: "coder"
114
114
RegionCode string `mapstructure:"region_code"`
115
115
// Usage: Region name that for the embedded DERP server.
116
- // Flag: " derp-server-region-name"
116
+ // Flag: derp-server-region-name
117
117
// Default: "Coder Embedded Relay"
118
118
RegionName string `mapstructure:"region_name"`
119
119
// Usage: Addresses for STUN servers to establish P2P connections. Set empty to disable P2P connections.
120
- // Flag: " derp-server-stun-addresses"
120
+ // Flag: derp-server-stun-addresses
121
121
// Default: []string{"stun.l.google.com:19302"}
122
122
STUNAddresses []string `mapstructure:"stun_address"`
123
123
}
124
124
125
125
type DERPConfigConfig struct {
126
126
// Usage: URL to fetch a DERP mapping on startup. See: https://tailscale.com/kb/1118/custom-derp-servers/
127
- // Flag: " derp-config-url"
127
+ // Flag: derp-config-url
128
128
URL string `mapstructure:"url"`
129
129
// Usage: Path to read a DERP mapping from. See: https://tailscale.com/kb/1118/custom-derp-servers/
130
- // Flag: " derp-config-path"
130
+ // Flag: derp-config-path
131
131
Path string `mapstructure:"path"`
132
132
}
133
133
134
134
type PrometheusConfig struct {
135
135
// Usage: Serve prometheus metrics on the address defined by prometheus address.
136
- // Flag: " prometheus-enable"
136
+ // Flag: prometheus-enable
137
137
Enable bool `mapstructure:"enabled"`
138
138
// Usage: The bind address to serve prometheus metrics.
139
- // Flag: " prometheus-address"
139
+ // Flag: prometheus-address
140
140
// Default: "127.0.0.1:2112"
141
141
Address string `mapstructure:"address"`
142
142
}
143
143
144
144
type PprofConfig struct {
145
145
// Usage: Serve pprof metrics on the address defined by pprof address.
146
- // Flag: " pprof-enable"
146
+ // Flag: pprof-enable
147
147
Enable bool `mapstructure:"enabled"`
148
148
// Usage: The bind address to serve pprof.
149
- // Flag: " pprof-address"
149
+ // Flag: pprof-address
150
150
// Default: "127.0.0.1:6060"
151
151
Address string `mapstructure:"address"`
152
152
}
153
153
154
154
type OAuth2GithubConfig struct {
155
155
// Usage: Client ID for Login with GitHub.
156
- // Flag: " oauth2-github-client-id"
156
+ // Flag: oauth2-github-client-id
157
157
ClientID string `mapstructure:"client_id"`
158
158
// Usage: Client secret for Login with GitHub.
159
- // Flag: " oauth2-github-client-secret"
159
+ // Flag: oauth2-github-client-secret
160
160
ClientSecret string `mapstructure:"client_secret"`
161
161
// Usage: Organizations the user must be a member of to Login with GitHub.
162
- // Flag: " oauth2-github-allowed-orgs"
162
+ // Flag: oauth2-github-allowed-orgs
163
163
AllowedOrganizations []string `mapstructure:"allowed_organizations"`
164
164
// Usage: Teams inside organizations the user must be a member of to Login with GitHub. Structured as: <organization-name>/<team-slug>.
165
- // Flag: " oauth2-github-allowed-teams"
165
+ // Flag: oauth2-github-allowed-teams
166
166
AllowedTeams []string `mapstructure:"allowed_teams"`
167
167
// Usage: Whether new users can sign up with GitHub.
168
- // Flag: " oauth2-github-allow-signups"
168
+ // Flag: oauth2-github-allow-signups
169
169
AllowSignups bool `mapstructure:"allow_signups"`
170
170
// Usage: Base URL of a GitHub Enterprise deployment to use for Login with GitHub.
171
- // Flag: " oauth2-github-enterprise-base-url"
171
+ // Flag: oauth2-github-enterprise-base-url
172
172
EnterpriseBaseURL string `mapstructure:"enterprise_base_url"`
173
173
}
174
174
175
175
type OIDCConfig struct {
176
176
// Usage: Whether new users can sign up with OIDC.
177
- // Flag: " oidc-allow-signups"
177
+ // Flag: oidc-allow-signups
178
178
// Default: true
179
179
AllowSignups bool `mapstructure:"allow_signups"`
180
180
// Usage: Client ID to use for Login with OIDC.
181
- // Flag: " oidc-client-id"
181
+ // Flag: oidc-client-id
182
182
ClientID string `mapstructure:"client_id"`
183
183
// Usage: Client secret to use for Login with OIDC.
184
- // Flag: " oidc-client-secret"
184
+ // Flag: oidc-client-secret
185
185
ClientSecret string `mapstructure:"cliet_secret"`
186
186
// Usage: Email domain that clients logging in with OIDC must match.
187
- // Flag: " oidc-email-domain"
187
+ // Flag: oidc-email-domain
188
188
EmailDomain string `mapstructure:"email_domain"`
189
189
// Usage: Issuer URL to use for Login with OIDC.
190
- // Flag: " oidc-issuer-url"
190
+ // Flag: oidc-issuer-url
191
191
IssuerURL string `mapstructure:"issuer_url"`
192
192
// Usage: Scopes to grant when authenticating with OIDC.
193
- // Flag: " oidc-scopes"
193
+ // Flag: oidc-scopes
194
194
// Default: []string{oidc.ScopeOpenID, "profile", "email"}
195
195
Scopes []string `mapstructure:"scopes"`
196
196
}
197
197
198
198
type TelemetryConfig struct {
199
199
// Usage: Whether telemetry is enabled or not. Coder collects anonymized usage data to help improve our product.
200
- // Flag: " telemetry"
200
+ // Flag: telemetry
201
201
// Default: flag.Lookup("test.v") == nil
202
202
Enable bool `mapstructure:"enable"`
203
203
// Usage: Whether Opentelemetry traces are sent to Coder. Coder collects anonymized application tracing to help improve our product. Disabling telemetry also disables this option.
204
- // Flag: " telemetry-trace"
204
+ // Flag: telemetry-trace
205
205
// Default: flag.Lookup("test.v") == nil
206
206
TraceEnable bool `mapstructure:"trace_enable"`
207
207
// Usage: URL to send telemetry.
208
- // Flag: " telemetry-url"
208
+ // Flag: telemetry-url
209
209
// Hidden: true
210
210
// Default: "https://telemetry.coder.com"
211
211
URL string `mapstructure:"url"`
212
212
}
213
213
214
214
type TLSConfig struct {
215
215
// Usage: Whether TLS will be enabled.
216
- // Flag: " tls-enable"
216
+ // Flag: tls-enable
217
217
Enable bool `mapstructure:"tls_enable"`
218
218
// Usage: Path to each certificate for TLS. It requires a PEM-encoded file. To configure the listener to use a CA certificate, concatenate the primary certificate and the CA certificate together. The primary certificate should appear first in the combined file.
219
- // Flag: " tls-cert-file"
219
+ // Flag: tls-cert-file
220
220
CertFiles []string `mapstructure:"tls_cert_files"`
221
221
// Usage: PEM-encoded Certificate Authority file used for checking the authenticity of client
222
- // Flag: " tls-client-ca-file"
222
+ // Flag: tls-client-ca-file
223
223
ClientCAFile string `mapstructure:"tls_client_ca_file"`
224
224
// Usage: Policy the server will follow for TLS Client Authentication. Accepted values are "none", "request", "require-any", "verify-if-given", or "require-and-verify".
225
- // Flag: " tls-client-auth"
225
+ // Flag: tls-client-auth
226
226
ClientAuth string `mapstructure:"tls_client_auth"`
227
227
// Usage: Paths to the private keys for each of the certificates. It requires a PEM-encoded file.
228
- // Flag: " tls-key-file"
228
+ // Flag: tls-key-file
229
229
KeyFiles []string `mapstructure:"tls_key_tiles"`
230
230
// Usage: Minimum supported version of TLS. Accepted values are "tls10", "tls11", "tls12" or "tls13"
231
- // Flag: " tls-min-version"
232
- // Default: " tls12"
231
+ // Flag: tls-min-version
232
+ // Default: tls12
233
233
MinVersion string `mapstructure:"tls_min_version"`
234
234
}
235
235
0 commit comments