Skip to content

Save default and max workspace resources on agent update

Vishal Tak requested to merge vtak/reosurces_agent_config into master

What does this MR do and why?

Issue - Backend: Add logic for saving agent configurati... (#428582 - closed)

Related agent issue - Agent: Update protobuf definition for agent con... (#427142 - closed)

Save default and max workspace resources on agent update

Add validators for kubernetes container resources.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Set the agent config to include max_resources_per_workspace and default_resources_per_workspace_container
remote_development:
  enabled: true
  dns_zone: workspaces.localdev.me
  network_policy:
    enabled: true
    egress:
    - allow: '0.0.0.0/0'
      except:
      - '10.0.0.0/8'
      - '172.16.0.0/12'
      - '192.168.0.0/16'
    - allow: '172.16.123.1/32'
  max_resources_per_workspace:
    limits:
      cpu: "5"
      memory: "5Gi"
    requests:
      cpu: "3"
      memory: "3Gi"
  default_resources_per_workspace_container:
    limits:
      cpu: "1.5"
      memory: "786Mi"
    requests:
      cpu: "0.6"
      memory: "512Mi"
  1. Verify the value is set in the corresponding DB field of the remote_development_agent_configs table.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chad Woolley

Merge request reports

Loading