Files
kubespray/tests/cloud_playbooks/roles/packet-ci/vars/main.yml
Max Gautier 65c67c5c51 CI: use Kubernetes GC to delete kubevirt vms
This leverage the Kubernetes GC to delete kubevirt VMs, by using
ownerReferences, with the CI pod running the playbook as the owner.
This concretely means that the control plane in our CI cluster will
delete the kubevirt VMs associated with a particular ci job as soon as
that pod job is deleted, which usually happens when the job terminates,
(barring errors, which will be addressed in the cluster directly)

Upgrade to kubevirt.io/v1 for the VirtualMachine manifests, since the
alpha version is deprecated.
2024-10-18 12:14:52 +02:00

20 lines
648 B
YAML

---
_vm_count_dict:
separate: 3
ha: 3
ha-recover: 3
ha-recover-noquorum: 3
all-in-one: 1
node-etcd-client: 4
default: 2
vm_count: "{{ _vm_count_dict[mode | d('default')] }}"
# Get pod metadata / CI vars from environment
ci_job_id: "{{ lookup('ansible.builtin.env', 'CI_JOB_ID', default=undefined) }}"
ci_job_name: "{{ lookup('ansible.builtin.env', 'CI_JOB_NAME', default=undefined) }}"
pod_name: "{{ lookup('ansible.builtin.env', 'POD_NAME', default=undefined) }}"
pod_uid: "{{ lookup('ansible.builtin.env', 'POD_UID', default=undefined) }}"
pod_namespace: "{{ lookup('ansible.builtin.env', 'POD_NAMESPACE', default=undefined) }}"