Browse Source

CI: reduce VM resources requests to improve scheduling

pull/11255/head
ant31 5 months ago
parent
commit
2214071a82
15 changed files with 20 additions and 19 deletions
  1. 7
      tests/cloud_playbooks/roles/packet-ci/defaults/main.yml
  2. 6
      tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2
  3. 2
      tests/files/packet_almalinux8-calico-ha-ebpf.yml
  4. 2
      tests/files/packet_almalinux8-calico-nodelocaldns-secondary.yml
  5. 2
      tests/files/packet_almalinux8-calico.yml
  6. 2
      tests/files/packet_almalinux8-docker.yml
  7. 2
      tests/files/packet_almalinux8-kube-ovn.yml
  8. 2
      tests/files/packet_rockylinux8-calico.yml
  9. 2
      tests/files/packet_rockylinux9-calico.yml
  10. 2
      tests/files/packet_rockylinux9-cilium.yml
  11. 2
      tests/files/packet_ubuntu22-all-in-one-docker.yml
  12. 2
      tests/files/packet_ubuntu22-calico-all-in-one.yml
  13. 2
      tests/files/packet_ubuntu24-all-in-one-docker.yml
  14. 2
      tests/files/packet_ubuntu24-calico-all-in-one.yml
  15. 2
      tests/files/packet_ubuntu24-calico-etcd-datastore.yml

7
tests/cloud_playbooks/roles/packet-ci/defaults/main.yml

@ -4,15 +4,14 @@
vm_cpu_cores: 2
vm_cpu_sockets: 1
vm_cpu_threads: 2
vm_memory: 2048Mi
vm_memory: 2048
# Replace invalid characters so that we can use the branch name in kubernetes labels
branch_name_sane: "{{ branch | regex_replace('/', '-') }}"
# Request/Limit allocation settings
cpu_allocation_ratio: 0.5
memory_allocation_ratio: 1
cpu_allocation_ratio: 0.25
memory_allocation_ratio: 0.5
# Default path for inventory
inventory_path: "/tmp/{{ test_name }}/inventory"

6
tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2

@ -4,6 +4,8 @@ kind: VirtualMachine
metadata:
name: "instance-{{ vm_id }}"
namespace: "{{ test_name }}"
annotations:
kubespray.com/ci.template-path: "tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2"
labels:
kubevirt.io/os: {{ cloud_image }}
spec:
@ -34,10 +36,10 @@ spec:
threads: {{ vm_cpu_threads }}
resources:
requests:
memory: {{ vm_memory * memory_allocation_ratio }}
memory: "{{ vm_memory * memory_allocation_ratio }}Mi"
cpu: {{ vm_cpu_cores * cpu_allocation_ratio }}
limits:
memory: {{ vm_memory }}
memory: "{{ vm_memory }}Mi"
cpu: {{ vm_cpu_cores }}
networks:
- name: default

2
tests/files/packet_almalinux8-calico-ha-ebpf.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: almalinux-8
mode: ha
vm_memory: 3072Mi
vm_memory: 3072
# Kubespray settings
calico_bpf_enabled: true

2
tests/files/packet_almalinux8-calico-nodelocaldns-secondary.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: almalinux-8
mode: default
vm_memory: 3072Mi
vm_memory: 3072
# Kubespray settings
enable_nodelocaldns_secondary: true

2
tests/files/packet_almalinux8-calico.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: almalinux-8
mode: default
vm_memory: 3072Mi
vm_memory: 3072
# Kubespray settings
metrics_server_enabled: true

2
tests/files/packet_almalinux8-docker.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: almalinux-8
mode: default
vm_memory: 3072Mi
vm_memory: 3072
# Use docker
container_manager: docker

2
tests/files/packet_almalinux8-kube-ovn.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: almalinux-8
mode: default
vm_memory: 3072Mi
vm_memory: 3072
# Kubespray settings
kube_network_plugin: kube-ovn

2
tests/files/packet_rockylinux8-calico.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: rockylinux-8
mode: default
vm_memory: 3072Mi
vm_memory: 3072
# Kubespray settings
metrics_server_enabled: true

2
tests/files/packet_rockylinux9-calico.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: rockylinux-9
mode: default
vm_memory: 3072Mi
vm_memory: 3072
# Kubespray settings
metrics_server_enabled: true

2
tests/files/packet_rockylinux9-cilium.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: rockylinux-9
mode: default
vm_memory: 3072Mi
vm_memory: 3072
# Kubespray settings
kube_network_plugin: cilium

2
tests/files/packet_ubuntu22-all-in-one-docker.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: ubuntu-2204
mode: all-in-one
vm_memory: 1600Mi
vm_memory: 1600
# Kubespray settings
auto_renew_certificates: true

2
tests/files/packet_ubuntu22-calico-all-in-one.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: ubuntu-2204
mode: all-in-one
vm_memory: 1600Mi
vm_memory: 1600
# Kubespray settings
auto_renew_certificates: true

2
tests/files/packet_ubuntu24-all-in-one-docker.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: ubuntu-2404
mode: all-in-one
vm_memory: 1600Mi
vm_memory: 1600
# Kubespray settings
auto_renew_certificates: true

2
tests/files/packet_ubuntu24-calico-all-in-one.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: ubuntu-2404
mode: all-in-one
vm_memory: 1600Mi
vm_memory: 1600
# Kubespray settings
auto_renew_certificates: true

2
tests/files/packet_ubuntu24-calico-etcd-datastore.yml

@ -2,7 +2,7 @@
# Instance settings
cloud_image: ubuntu-2404
mode: node-etcd-client
vm_memory: 1600Mi
vm_memory: 1600
# Kubespray settings
auto_renew_certificates: true

Loading…
Cancel
Save