Skip to content

Commit f8dc116

Browse files
committed
feat: add host suffix to /api/v2/deployment/ssh
1 parent ef272ce commit f8dc116

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cli/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
653653
SSHConfig: codersdk.SSHConfigResponse{
654654
HostnamePrefix: vals.SSHConfig.DeploymentName.String(),
655655
SSHConfigOptions: configSSHOptions,
656+
HostnameSuffix: vals.WorkspaceHostnameSuffix.String(),
656657
},
657658
AllowWorkspaceRenames: vals.AllowWorkspaceRenames.Value(),
658659
Entitlements: entitlements.New(),

codersdk/deployment.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3393,7 +3393,12 @@ type DeploymentStats struct {
33933393
}
33943394

33953395
type SSHConfigResponse struct {
3396-
HostnamePrefix string `json:"hostname_prefix"`
3396+
// HostnamePrefix is the prefix we append to workspace names for SSH hostnames.
3397+
// Deprecated: use HostnameSuffix instead.
3398+
HostnamePrefix string `json:"hostname_prefix"`
3399+
3400+
// HostnameSuffix is the suffix to append to workspace names for SSH hostnames.
3401+
HostnameSuffix string `json:"hostname_suffix"`
33973402
SSHConfigOptions map[string]string `json:"ssh_config_options"`
33983403
}
33993404

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