Skip to content

Create table workspace_agentk_states to store generated Kubernetes manifest for workspaces

MR: Create workspace_agentk_states table (!190027 - merged) • Ashvin Sharma • 18.1

Description

Introduce a new DB table - workspace_agentk_states. The name contains agentk to denote that the information contained in this table are used when using agentk. This sets up the stage where we will introduce other executors for Workspaces(e.g. Workspaces on CI Runners). This table will have only 1 field desired_config which is a jsonb. *

  • Introduce a new DB table - workspace_agentk_states. The name contains agentk to denote that the information contained in this table are used when using agentk. This sets up the stage where we will introduce other executors for Workspaces(e.g. Workspaces on CI Runners).
  • The column desired_config will store the generated kubernetes manifest without the contents of the secret.
  • desired_config JSON WILL NOT have any validation for time being. The validation will be implicitly handled by Kubernetes since the kube-api returns error if the object does not adhere to the schema.

Acceptance criteria

  • A new table should be created

Implementation plan

Create a new table with the following columns.

Column name Type Remarks

workspace_id

Integer

foreign key to workspaces table.

workspaces and workspace_agentk_state should have a one-to-one mapping.

desired_config

jsonb This column will store the generated kubernetes manifest without the contents of the secret.
Edited by Ashvin Sharma