Skip to content

Commit 51f3a38

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

File tree

9 files changed

+28
-7
lines changed

9 files changed

+28
-7
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(),

coderd/apidoc/docs.go

Lines changed: 5 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: 5 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: 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

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: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.2
1+
1.11.3

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.

site/src/testHelpers/entities.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3032,6 +3032,7 @@ export const MockDeploymentStats: TypesGen.DeploymentStats = {
30323032
export const MockDeploymentSSH: TypesGen.SSHConfigResponse = {
30333033
hostname_prefix: " coder.",
30343034
ssh_config_options: {},
3035+
hostname_suffix: "coder",
30353036
};
30363037

30373038
export const MockWorkspaceAgentLogs: TypesGen.WorkspaceAgentLog[] = [

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