mirror of
https://github.com/coder/coder.git
synced 2026-06-04 13:38:21 +00:00
19b4323512
This enables a "kubernetes_pod" to attach multiple agents that could be for multiple services. Each agent is required to have a unique name, so SSH syntax is: `coder ssh <workspace>.<agent>` A resource can have zero agents too, they aren't required.
30 lines
389 B
SQL
30 lines
389 B
SQL
-- name: GetWorkspaceResourceByID :one
|
|
SELECT
|
|
*
|
|
FROM
|
|
workspace_resources
|
|
WHERE
|
|
id = $1;
|
|
|
|
-- name: GetWorkspaceResourcesByJobID :many
|
|
SELECT
|
|
*
|
|
FROM
|
|
workspace_resources
|
|
WHERE
|
|
job_id = $1;
|
|
|
|
-- name: InsertWorkspaceResource :one
|
|
INSERT INTO
|
|
workspace_resources (
|
|
id,
|
|
created_at,
|
|
job_id,
|
|
transition,
|
|
address,
|
|
type,
|
|
name
|
|
)
|
|
VALUES
|
|
($1, $2, $3, $4, $5, $6, $7) RETURNING *;
|