mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add CODER_WORKSPACE_HOSTNAME_SUFFIX (#17268)
Adds deployment option `CODER_WORKSPACE_HOSTNAME_SUFFIX`. This will eventually replace `CODER_SSH_HOSTNAME_PREFIX`, but we will do this slowly and support both for `coder ssh` for some time. Note that the name is changed to "workspace" hostname, since this suffix will also be used for Coder Connect on Coder Desktop, which is not limited to SSH.
This commit is contained in:
+13
-1
@@ -393,6 +393,7 @@ type DeploymentValues struct {
|
||||
TermsOfServiceURL serpent.String `json:"terms_of_service_url,omitempty" typescript:",notnull"`
|
||||
Notifications NotificationsConfig `json:"notifications,omitempty" typescript:",notnull"`
|
||||
AdditionalCSPPolicy serpent.StringArray `json:"additional_csp_policy,omitempty" typescript:",notnull"`
|
||||
WorkspaceHostnameSuffix serpent.String `json:"workspace_hostname_suffix,omitempty" typescript:",notnull"`
|
||||
|
||||
Config serpent.YAMLConfigPath `json:"config,omitempty" typescript:",notnull"`
|
||||
WriteConfig serpent.Bool `json:"write_config,omitempty" typescript:",notnull"`
|
||||
@@ -944,7 +945,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
|
||||
deploymentGroupClient = serpent.Group{
|
||||
Name: "Client",
|
||||
Description: "These options change the behavior of how clients interact with the Coder. " +
|
||||
"Clients include the coder cli, vs code extension, and the web UI.",
|
||||
"Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.",
|
||||
YAML: "client",
|
||||
}
|
||||
deploymentGroupConfig = serpent.Group{
|
||||
@@ -2549,6 +2550,17 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
|
||||
Hidden: false,
|
||||
Default: "coder.",
|
||||
},
|
||||
{
|
||||
Name: "Workspace Hostname Suffix",
|
||||
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.",
|
||||
Flag: "workspace-hostname-suffix",
|
||||
Env: "CODER_WORKSPACE_HOSTNAME_SUFFIX",
|
||||
YAML: "workspaceHostnameSuffix",
|
||||
Group: &deploymentGroupClient,
|
||||
Value: &c.WorkspaceHostnameSuffix,
|
||||
Hidden: false,
|
||||
Default: "coder",
|
||||
},
|
||||
{
|
||||
Name: "SSH Config Options",
|
||||
Description: "These SSH config options will override the default SSH config options. " +
|
||||
|
||||
Reference in New Issue
Block a user