Skip to content

Commit ef272ce

Browse files
committed
feat: add CODER_WORKSPACE_HOSTNAME_SUFFIX
1 parent 42e5d71 commit ef272ce

File tree

10 files changed

+52
-4
lines changed

10 files changed

+52
-4
lines changed

cli/testdata/coder_server_--help.golden

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ OPTIONS:
7878

7979
CLIENT OPTIONS:
8080
These options change the behavior of how clients interact with the Coder.
81-
Clients include the coder cli, vs code extension, and the web UI.
81+
Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
8282

8383
--cli-upgrade-message string, $CODER_CLI_UPGRADE_MESSAGE
8484
The upgrade message to display to users when a client/server mismatch
@@ -98,6 +98,11 @@ Clients include the coder cli, vs code extension, and the web UI.
9898
The renderer to use when opening a web terminal. Valid values are
9999
'canvas', 'webgl', or 'dom'.
100100

101+
--workspace-hostname-suffix string, $CODER_WORKSPACE_HOSTNAME_SUFFIX (default: coder)
102+
Workspace hostnames use this suffix in SSH config and Coder Connect on
103+
Coder Desktop. By default it is coder, resulting in names like
104+
myworkspace.coder.
105+
101106
CONFIG OPTIONS:
102107
Use a YAML configuration file when your server launch become unwieldy.
103108

cli/testdata/server-config.yaml.golden

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,15 @@ disablePathApps: false
490490
# (default: <unset>, type: bool)
491491
disableOwnerWorkspaceAccess: false
492492
# These options change the behavior of how clients interact with the Coder.
493-
# Clients include the coder cli, vs code extension, and the web UI.
493+
# Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
494494
client:
495495
# The SSH deployment prefix is used in the Host of the ssh config.
496496
# (default: coder., type: string)
497497
sshHostnamePrefix: coder.
498+
# Workspace hostnames use this suffix in SSH config and Coder Connect on Coder
499+
# Desktop. By default it is coder, resulting in names like myworkspace.coder.
500+
# (default: coder, type: string)
501+
workspaceHostnameSuffix: coder
498502
# These SSH config options will override the default SSH config options. Provide
499503
# options in "key=value" or "key value" format separated by commas.Using this
500504
# incorrectly can break SSH to your deployment, use cautiously.

coderd/apidoc/docs.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ type DeploymentValues struct {
393393
TermsOfServiceURL serpent.String `json:"terms_of_service_url,omitempty" typescript:",notnull"`
394394
Notifications NotificationsConfig `json:"notifications,omitempty" typescript:",notnull"`
395395
AdditionalCSPPolicy serpent.StringArray `json:"additional_csp_policy,omitempty" typescript:",notnull"`
396+
WorkspaceHostnameSuffix serpent.String `json:"workspace_hostname_suffix,omitempty" typescript:",notnull"`
396397

397398
Config serpent.YAMLConfigPath `json:"config,omitempty" typescript:",notnull"`
398399
WriteConfig serpent.Bool `json:"write_config,omitempty" typescript:",notnull"`
@@ -944,7 +945,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
944945
deploymentGroupClient = serpent.Group{
945946
Name: "Client",
946947
Description: "These options change the behavior of how clients interact with the Coder. " +
947-
"Clients include the coder cli, vs code extension, and the web UI.",
948+
"Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.",
948949
YAML: "client",
949950
}
950951
deploymentGroupConfig = serpent.Group{
@@ -2549,6 +2550,17 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
25492550
Hidden: false,
25502551
Default: "coder.",
25512552
},
2553+
{
2554+
Name: "Workspace Hostname Suffix",
2555+
Description: "Workspace hostnames use this suffix in SSH config and Coder Connect on Coder Desktop. By default it is coder, resulting in names like myworkspace.coder.",
2556+
Flag: "workspace-hostname-suffix",
2557+
Env: "CODER_WORKSPACE_HOSTNAME_SUFFIX",
2558+
YAML: "workspaceHostnameSuffix",
2559+
Group: &deploymentGroupClient,
2560+
Value: &c.WorkspaceHostnameSuffix,
2561+
Hidden: false,
2562+
Default: "coder",
2563+
},
25522564
{
25532565
Name: "SSH Config Options",
25542566
Description: "These SSH config options will override the default SSH config options. " +

docs/reference/api/general.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/api/schemas.md

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/cli/server.md

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enterprise/cli/testdata/coder_server_--help.golden

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ OPTIONS:
7979

8080
CLIENT OPTIONS:
8181
These options change the behavior of how clients interact with the Coder.
82-
Clients include the coder cli, vs code extension, and the web UI.
82+
Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
8383

8484
--cli-upgrade-message string, $CODER_CLI_UPGRADE_MESSAGE
8585
The upgrade message to display to users when a client/server mismatch
@@ -99,6 +99,11 @@ Clients include the coder cli, vs code extension, and the web UI.
9999
The renderer to use when opening a web terminal. Valid values are
100100
'canvas', 'webgl', or 'dom'.
101101

102+
--workspace-hostname-suffix string, $CODER_WORKSPACE_HOSTNAME_SUFFIX (default: coder)
103+
Workspace hostnames use this suffix in SSH config and Coder Connect on
104+
Coder Desktop. By default it is coder, resulting in names like
105+
myworkspace.coder.
106+
102107
CONFIG OPTIONS:
103108
Use a YAML configuration file when your server launch become unwieldy.
104109

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy