diff --git a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml b/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml index 59ef0f8fe..eee3248fa 100644 --- a/tests/cloud_playbooks/roles/packet-ci/defaults/main.yml +++ b/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" 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 6a8e02721..371656b73 100644 --- a/tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2 +++ b/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 diff --git a/tests/files/packet_almalinux8-calico-ha-ebpf.yml b/tests/files/packet_almalinux8-calico-ha-ebpf.yml index e4f4bb658..21b7d8e01 100644 --- a/tests/files/packet_almalinux8-calico-ha-ebpf.yml +++ b/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 diff --git a/tests/files/packet_almalinux8-calico-nodelocaldns-secondary.yml b/tests/files/packet_almalinux8-calico-nodelocaldns-secondary.yml index 52ef86984..626825863 100644 --- a/tests/files/packet_almalinux8-calico-nodelocaldns-secondary.yml +++ b/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 diff --git a/tests/files/packet_almalinux8-calico.yml b/tests/files/packet_almalinux8-calico.yml index 648a72d13..37a5deb5d 100644 --- a/tests/files/packet_almalinux8-calico.yml +++ b/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 diff --git a/tests/files/packet_almalinux8-docker.yml b/tests/files/packet_almalinux8-docker.yml index bcc69cd53..17917a097 100644 --- a/tests/files/packet_almalinux8-docker.yml +++ b/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 diff --git a/tests/files/packet_almalinux8-kube-ovn.yml b/tests/files/packet_almalinux8-kube-ovn.yml index 15dbabbd2..1514ccc87 100644 --- a/tests/files/packet_almalinux8-kube-ovn.yml +++ b/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 diff --git a/tests/files/packet_rockylinux8-calico.yml b/tests/files/packet_rockylinux8-calico.yml index b47511215..e71c0615e 100644 --- a/tests/files/packet_rockylinux8-calico.yml +++ b/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 diff --git a/tests/files/packet_rockylinux9-calico.yml b/tests/files/packet_rockylinux9-calico.yml index 17e6ae58b..5f3fcc5b0 100644 --- a/tests/files/packet_rockylinux9-calico.yml +++ b/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 diff --git a/tests/files/packet_rockylinux9-cilium.yml b/tests/files/packet_rockylinux9-cilium.yml index 033fde1b8..2f759f0f5 100644 --- a/tests/files/packet_rockylinux9-cilium.yml +++ b/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 diff --git a/tests/files/packet_ubuntu22-all-in-one-docker.yml b/tests/files/packet_ubuntu22-all-in-one-docker.yml index ddd320a29..16ae45986 100644 --- a/tests/files/packet_ubuntu22-all-in-one-docker.yml +++ b/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 diff --git a/tests/files/packet_ubuntu22-calico-all-in-one.yml b/tests/files/packet_ubuntu22-calico-all-in-one.yml index 614cbeabc..2c666f8e3 100644 --- a/tests/files/packet_ubuntu22-calico-all-in-one.yml +++ b/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 diff --git a/tests/files/packet_ubuntu24-all-in-one-docker.yml b/tests/files/packet_ubuntu24-all-in-one-docker.yml index b8318d49a..d4a0adccb 100644 --- a/tests/files/packet_ubuntu24-all-in-one-docker.yml +++ b/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 diff --git a/tests/files/packet_ubuntu24-calico-all-in-one.yml b/tests/files/packet_ubuntu24-calico-all-in-one.yml index 286034b27..4b9e403ca 100644 --- a/tests/files/packet_ubuntu24-calico-all-in-one.yml +++ b/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 diff --git a/tests/files/packet_ubuntu24-calico-etcd-datastore.yml b/tests/files/packet_ubuntu24-calico-etcd-datastore.yml index ec7747de2..2805fa731 100644 --- a/tests/files/packet_ubuntu24-calico-etcd-datastore.yml +++ b/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