feat: Add deployment side config-ssh options (#6613)

* feat: Allow setting deployment wide ssh config settings
* feat: config-ssh respects deployment ssh config
* The '.' is now configurable
* Move buildinfo into deployment.go
This commit is contained in:
Steven Masley
2023-03-16 13:03:37 -05:00
committed by GitHub
parent 25e8abd63e
commit fe247c86eb
18 changed files with 642 additions and 49 deletions
+58
View File
@@ -384,6 +384,31 @@ const docTemplate = `{
}
}
},
"/deployment/ssh": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"General"
],
"summary": "SSH Config",
"operationId": "ssh-config",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.SSHConfigResponse"
}
}
}
}
},
"/deployment/stats": {
"get": {
"security": [
@@ -6574,6 +6599,9 @@ const docTemplate = `{
"config": {
"type": "string"
},
"config_ssh": {
"$ref": "#/definitions/codersdk.SSHConfig"
},
"dangerous": {
"$ref": "#/definitions/codersdk.DangerousConfig"
},
@@ -7688,6 +7716,36 @@ const docTemplate = `{
}
}
},
"codersdk.SSHConfig": {
"type": "object",
"properties": {
"deploymentName": {
"description": "DeploymentName is the config-ssh Hostname prefix",
"type": "string"
},
"sshconfigOptions": {
"description": "SSHConfigOptions are additional options to add to the ssh config file.\nThis will override defaults.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"codersdk.SSHConfigResponse": {
"type": "object",
"properties": {
"hostname_prefix": {
"type": "string"
},
"ssh_config_options": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"codersdk.ServiceBannerConfig": {
"type": "object",
"properties": {
+54
View File
@@ -326,6 +326,27 @@
}
}
},
"/deployment/ssh": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": ["application/json"],
"tags": ["General"],
"summary": "SSH Config",
"operationId": "ssh-config",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.SSHConfigResponse"
}
}
}
}
},
"/deployment/stats": {
"get": {
"security": [
@@ -5870,6 +5891,9 @@
"config": {
"type": "string"
},
"config_ssh": {
"$ref": "#/definitions/codersdk.SSHConfig"
},
"dangerous": {
"$ref": "#/definitions/codersdk.DangerousConfig"
},
@@ -6895,6 +6919,36 @@
}
}
},
"codersdk.SSHConfig": {
"type": "object",
"properties": {
"deploymentName": {
"description": "DeploymentName is the config-ssh Hostname prefix",
"type": "string"
},
"sshconfigOptions": {
"description": "SSHConfigOptions are additional options to add to the ssh config file.\nThis will override defaults.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"codersdk.SSHConfigResponse": {
"type": "object",
"properties": {
"hostname_prefix": {
"type": "string"
},
"ssh_config_options": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"codersdk.ServiceBannerConfig": {
"type": "object",
"properties": {