8000 chore: Proxy health status checks + endpoint by Emyrk · Pull Request #7233 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: Proxy health status checks + endpoint #7233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make gen
  • Loading branch information
Emyrk committed Apr 20, 2023
commit 4c91b081073c3e4991588b42f3d8a2e68590bf1b
34 changes: 33 additions & 1 deletion coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions codersdk/workspaceproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ const (
ProxyUnregistered ProxyHealthStatus = "unregistered"
)


type WorkspaceProxyStatus struct {
Status ProxyHealthStatus `json:"status" table:"status"`
CheckedAt time.Time `json:"checked_at" table:"checked_at"`
Status ProxyHealthStatus `json:"status" table:"status"`
CheckedAt time.Time `json:"checked_at" table:"checked_at"`
}

type WorkspaceProxy struct {
Expand Down
45 changes: 32 additions & 13 deletions docs/api/enterprise.md
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,11 @@ curl -X GET http://coder-server:8080/api/v2/workspaceproxies \
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"updated_at": "2019-08-24T14:15:22Z",
"status": {
"checked_at": "string",
"status": "reachable"
},
"updatedAt": "2019-08-24T14:15:22Z",
"url": "string",
"wildcard_hostname": "string"
}
Expand All @@ -1202,17 +1206,28 @@ curl -X GET http://coder-server:8080/api/v2/workspaceproxies \

Status Code **200**

| Name | Type | Required | Restrictions | Description |
| --------------------- | ----------------- | -------- | ------------ | -------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» created_at` | string(date-time) | false | | |
| `» deleted` | boolean | false | | |
| `» icon` | string | false | | |
| `» id` | string(uuid) | false | | |
| `» name` | string | false | | |
| `» updated_at` | string(date-time) | false | | |
| `» url` | string | false | | Full URL including scheme of the proxy api url: https://us.example.com |
| `» wildcard_hostname` | string | false | | Wildcard hostname with the wildcard for subdomain based app hosting: \*.us.example.com |
| Name | Type | Required | Restrictions | Description |
| --------------------- | ------------------------------------------------------------------------ | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[array item]` | array | false | | |
| `» created_at` | string(date-time) | false | | |
| `» deleted` | boolean | false | | |
| `» icon` | string | false | | |
| `» id` | string(uuid) | false | | |
| `» name` | string | false | | |
| `» status` | [codersdk.WorkspaceProxyStatus](schemas.md#codersdkworkspaceproxystatus) | false | | Status is the latest status check of the proxy. This will be empty for deleted proxies. This value can be used to determine if a workspace proxy is healthy and ready to use. |
| `»» checked_at` | string | false | | |
| `»» status` | [codersdk.ProxyHealthStatus](schemas.md#codersdkproxyhealthstatus) | false | | |
| `» updatedAt` | string(date-time) | false | | |
| `» url` | string | false | | Full URL including scheme of the proxy api url: https://us.example.com |
| `» wildcard_hostname` | string | false | | Wildcard hostname with the wildcard for subdomain based app hosting: \*.us.example.com |

#### Enumerated Values

| Property | Value |
| -------- | -------------- |
| `status` | `reachable` |
| `status` | `unreachable` |
| `status` | `unregistered` |

To perform this operation, you must be authenticated. [Learn more](authentication.md).

Expand Down Expand Up @@ -1259,7 +1274,11 @@ curl -X POST http://coder-server:8080/api/v2/workspaceproxies \
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"updated_at": "2019-08-24T14:15:22Z",
"status": {
"checked_at": "string",
"status": "reachable"
},
"updatedAt": "2019-08-24T14:15:22Z",
"url": "string",
"wildcard_hostname": "string"
}
Expand Down
59 changes: 48 additions & 11 deletions docs/api/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -3356,6 +3356,22 @@ Parameter represents a set value for the scope.
| ------ |
| `file` |

## codersdk.ProxyHealthStatus

```json
"reachable"
```

### Properties

#### Enumerated Values

| Value |
| -------------- |
| `reachable` |
| `unreachable` |
| `unregistered` |

## codersdk.PutExtendWorkspaceRequest

```json
Expand Down Expand Up @@ -5166,24 +5182,45 @@ Parameter represents a set value for the scope.
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"updated_at": "2019-08-24T14:15:22Z",
"status": {
"checked_at": "string",
"status": "reachable"
},
"updatedAt": "2019-08-24T14:15:22Z",
"url": "string",
"wildcard_hostname": "string"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| ------------------- | ------- | -------- | ------------ | -------------------------------------------------------------------------------------- |
| `created_at` | string | false | | |
| `deleted` | boolean | false | | |
| `icon` | string | false | | |
| `id` | string | false | | |
| `name` | string | false | | |
| `updated_at` | string | false | | |
| `url` | string | false | | Full URL including scheme of the proxy api url: https://us.example.com |
| `wildcard_hostname` | string | false | | Wildcard hostname with the wildcard for subdomain based app hosting: \*.us.example.com |
| Name | Type | Required | Restrictions | Description |
| ------------------- | -------------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `created_at` | string | false | | |
| `deleted` | boolean | false | | |
| `icon` | string | false | | |
| `id` | string | false | | |
| `name` | string | false | | |
| `status` | [codersdk.WorkspaceProxyStatus](#codersdkworkspaceproxystatus) | false | | Status is the latest status check of the proxy. This will be empty for deleted proxies. This value can be used to determine if a workspace proxy is healthy and ready to use. |
| `updatedAt` | string | false | | |
| `url` | string | false | | Full URL including scheme of the proxy api url: https://us.example.com |
| `wildcard_hostname` | string | false | | Wildcard hostname with the wildcard for subdomain based app hosting: \*.us.example.com |

## codersdk.WorkspaceProxyStatus

```json
{
"checked_at": "string",
"status": "reachable"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| ------------ | -------------------------------------------------------- | -------- | ------------ | ----------- |
| `checked_at` | string | false | | |
| `status` | [codersdk.ProxyHealthStatus](#codersdkproxyhealthstatus) | false | | |

## codersdk.WorkspaceQuota

Expand Down
0