Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2424873

Browse files
authored
feat: add host suffix to /api/v2/deployment/ssh (#17269)
Adds `HostnameSuffix` to ssh config API and deprecates `HostnamePrefix`. We will still support setting and using the prefix for some time.
1 parent 87d9ff0 commit 2424873

File tree

8 files changed

+27
-6
lines changed

8 files changed

+27
-6
lines changed

cli/server.go

+1
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

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

+6-1
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

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/api/schemas.md

+7-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/typesGenerated.ts

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/testHelpers/entities.ts

+1
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)