-
Notifications
You must be signed in to change notification settings - Fork 4
/
virtualmachine.yml.j2
76 lines (76 loc) · 1.97 KB
/
virtualmachine.yml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
labels:
app: {{ name }}
vm.kubevirt.io/template: 'centos7-server-small'
vm.kubevirt.io/template.namespace: 'openshift'
vm.kubevirt.io/template.revision: '1'
vm.kubevirt.io/template.version: 'v0.24.2'
name: {{ name }}
namespace: {{ namespace }}
spec:
dataVolumeTemplates:
- apiVersion: 'cdi.kubevirt.io/v1beta1'
kind: 'DataVolume'
metadata:
creationTimestamp: null
name: {{ name }}
spec:
source:
http:
url: {{ url }}
storage:
resources:
requests:
storage: {{boot_image_size}}
running: true
template:
metadata:
annotations:
vm.kubevirt.io/flavor: 'small'
vm.kubevirt.io/os: {{ name }}
vm.kubevirt.io/workload: 'server'
creationTimestamp: null
labels:
kubevirt.io/domain: {{ name }}
kubevirt.io/size: 'small'
spec:
domain:
cpu:
cores: {{ vm_cpus_cores }}
sockets: {{ vm_cpus_sockets }}
threads: {{ vm_cpus_threads }}
devices:
disks:
- disk:
bus: 'virtio'
name: 'rootdisk'
- disk:
bus: 'virtio'
name: 'cloudinitdisk'
interfaces:
- macAddress: {{macAddress}}
masquerade: {}
model: 'virtio'
name: 'default'
networkInterfaceMultiqueue: true
rng: {}
machine:
type: {{ vm_machine_type }}
resources:
requests:
memory: {{ vm_memory_requests }}
evictionStrategy: LiveMigrate
networks:
- name: default
pod: {}
terminationGracePeriodSeconds: 180
volumes:
- dataVolume:
name: {{ name }}
name: 'rootdisk'
- cloudInitNoCloud:
secretRef:
name: {{ cloud_init_secret }}
name: cloudinitdisk