DB: Add database fields for sudo access

MR: Add db fields for workspace sudo access (!163730 - merged)

Description

As per the plan described here, add the DB fields to support sudo access.

Acceptance Criteria

For the remote_developemnt_agent_configs table, the following fields must be added -

  • allow_privilege_escalation - boolean - Default value is false. No other validations needed.
  • use_kubernetes_user_namespaces - boolean - Default value is false. No other validations needed.
  • default_runtime_class - string - Default value is empty string (""). Validations are described at https://kubernetes.io/docs/concepts/containers/runtime-class/#2-create-the-corresponding-runtimeclass-resources
    • contain no more than 253 characters
    • contain only lowercase alphanumeric characters, '-' or '.'
    • start with an alphanumeric character
    • end with an alphanumeric character
  • annotations - jsonb - Default value is empty hash ({}). Validations are described at https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set .
    • Valid annotation keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/).
    • Prefixes ending with kubernetes.io and k8s.io are reserved for Kubernetes core components and should thus must not be allowed to be set by the user.
    • Prefixes ending with gitlab.com are reserved for Workspaces internal usage and should thus must not be allowed to be set by the user.
  • labels - jsonb - Default value is empty hash ({}). Validations are described at https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set .
    • Valid label keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/).
    • Prefixes ending with kubernetes.io and k8s.io are reserved for Kubernetes core components and should thus must not be allowed to be set by the user.
    • Prefixes ending with gitlab.com are reserved for Workspaces internal usage and should thus must not be allowed to be set by the user.
    • Valid label value:
      • must be 63 characters or less (can be empty),
      • unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
      • could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
Edited by Vishal Tak