mirror of
https://gitlab.com/TECHNOFAB/coder-templates.git
synced 2025-12-12 02:00:11 +01:00
chore(nix-kubernetes): allow configuring cpu and memory request for template
This commit is contained in:
parent
70601ffbd0
commit
1392cb7d0c
2 changed files with 12 additions and 3 deletions
|
|
@ -84,9 +84,8 @@
|
|||
];
|
||||
resources = {
|
||||
requests = {
|
||||
# TODO: allow configuring this via variables (template wide)
|
||||
cpu = "250m";
|
||||
memory = "512Mi";
|
||||
cpu = "\${var.cpu_request}";
|
||||
memory = "\${var.memory_request}";
|
||||
};
|
||||
limits = {
|
||||
cpu = "\${data.coder_parameter.cpu.value}";
|
||||
|
|
|
|||
|
|
@ -12,5 +12,15 @@
|
|||
error_message = "Invalid architecture selected";
|
||||
};
|
||||
};
|
||||
cpu_request = {
|
||||
type = "string";
|
||||
description = "CPU request to apply to workspaces. Kubernetes Notation (eg. 500m)";
|
||||
default = "0";
|
||||
};
|
||||
memory_request = {
|
||||
type = "string";
|
||||
description = "Memory request to apply to workspaces. Kubernetes Notation (eg. 1Gi)";
|
||||
default = "0";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue