diff --git a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml index f3a8fe56c..b63a7fcc2 100644 --- a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml +++ b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml @@ -6,6 +6,11 @@ vm_cpu_sockets: 1 vm_cpu_threads: 2 vm_memory: 4096Mi +# Request/Limit allocation settings + +cpu_allocation_ratio: 0.5 +memory_allocation_ratio: 1 + # Default path for inventory inventory_path: "/tmp/{{ test_name }}/inventory" diff --git a/tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2 b/tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2 index 52140219a..4db319404 100644 --- a/tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2 +++ b/tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2 @@ -34,6 +34,9 @@ spec: threads: {{ vm_cpu_cores }} resources: requests: + memory: {{ vm_memory * memory_allocation_ratio }} + cpu: {{ vm_cpu_cores * cpu_allocation_ratio }} + limits: memory: {{ vm_memory }} cpu: {{ vm_cpu_cores }} networks: