You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 KiB

  1. ---
  2. apiVersion: kubevirt.io/v1alpha3
  3. kind: VirtualMachine
  4. metadata:
  5. name: "instance-{{ vm_id }}"
  6. namespace: "{{ test_name }}"
  7. annotations:
  8. kubespray.com/ci.template-path: "tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2"
  9. labels:
  10. kubevirt.io/os: {{ cloud_image }}
  11. spec:
  12. running: true
  13. template:
  14. metadata:
  15. labels:
  16. kubevirt.io/size: small
  17. kubevirt.io/domain: "{{ test_name }}"
  18. spec:
  19. domain:
  20. devices:
  21. blockMultiQueue: true
  22. disks:
  23. - disk:
  24. bus: virtio
  25. name: containervolume
  26. cache: writethrough
  27. - disk:
  28. bus: virtio
  29. name: cloudinitvolume
  30. interfaces:
  31. - name: default
  32. bridge: {}
  33. cpu:
  34. cores: {{ vm_cpu_cores }}
  35. sockets: {{ vm_cpu_sockets }}
  36. threads: {{ vm_cpu_threads }}
  37. resources:
  38. requests:
  39. memory: "{{ vm_memory * memory_allocation_ratio }}Mi"
  40. cpu: {{ vm_cpu_cores * cpu_allocation_ratio }}
  41. limits:
  42. memory: "{{ vm_memory }}Mi"
  43. cpu: {{ vm_cpu_cores }}
  44. networks:
  45. - name: default
  46. pod: {}
  47. terminationGracePeriodSeconds: 0
  48. volumes:
  49. - name: containervolume
  50. containerDisk:
  51. image: quay.io/kubespray/vm-{{ cloud_image }}
  52. - name: cloudinitvolume
  53. cloudInitNoCloud:
  54. userDataBase64: {{ cloud_init[cloud_image] }}