blob: a0d19e518e8308add37be904d6925cdac78434e5 [file] [log] [blame]
Giorgi Lekveishvili330c5542024-08-26 08:34:08 +04001apiVersion: kubevirt.io/v1
2kind: VirtualMachine
3metadata:
4 labels:
5 kubevirt.io/os: linux
6 name: {{ .Values.name }}
7spec:
8 running: true
9 template:
10 metadata:
11 creationTimestamp: null
12 labels:
13 kubevirt.io/domain: debian
Giorgi Lekveishvili807a5312024-08-26 09:33:41 +040014 app: {{ .Values.name }}
Giorgi Lekveishvili330c5542024-08-26 08:34:08 +040015 spec:
16 domain:
17 cpu:
18 cores: {{ .Values.cpuCores }}
19 resources:
20 limits:
21 memory: {{ .Values.memory }}
22 devices:
23 interfaces:
Giorgi Lekveishvili64cb6e32024-08-27 08:26:04 +040024 - name: default
Giorgi Lekveishvili79a5eb02024-09-02 14:42:28 +040025 # masquerade: {}
26 bridge: {}
Giorgi Lekveishvili330c5542024-08-26 08:34:08 +040027 ports:
Giorgi Lekveishvili8af50922024-10-29 22:44:14 +040028 {{- range .Values.ports }}
29 - name: {{ .name }}
Giorgi Lekveishvilicc41e252024-10-29 22:56:33 +040030 port: {{ .value }}
Giorgi Lekveishvili8af50922024-10-29 22:44:14 +040031 protocol: {{ .protocol }}
32 {{- end }}
Giorgi Lekveishvili330c5542024-08-26 08:34:08 +040033 disks:
34 - name: disk0
35 disk:
36 bus: virtio
37 - name: cloudinitdisk
38 disk:
39 bus: virtio
40 readonly: true
Giorgi Lekveishvili518eb8c2025-04-20 07:51:00 +040041 {{- if .Values.configFiles }}
42 # TODO(gio): switch to filesystems for real-time updates
Giorgi Lekveishvili4cd22e32025-04-20 07:26:59 +040043 - name: configs
Giorgi Lekveishvili4cd22e32025-04-20 07:26:59 +040044 disk:
Giorgi Lekveishvili11e0dfb2025-04-20 07:36:14 +040045 bus: virtio
46 readonly: true
Giorgi Lekveishvili518eb8c2025-04-20 07:51:00 +040047 serial: DODOCONFIGFILES
48 {{- end }}
Giorgi Lekveishvili330c5542024-08-26 08:34:08 +040049 networks:
50 - name: default
51 pod: {}
52 volumes:
53 - name: disk0
54 persistentVolumeClaim:
55 claimName: dv-{{ .Values.name }}
56 - name: cloudinitdisk
57 cloudInitNoCloud:
Giorgi Lekveishvili4f27a0f2024-09-03 22:15:33 +040058 secretRef:
Giorgi Lekveishvilif739d352024-09-03 22:02:40 +040059 name: {{ .Values.name }}-user-data
Giorgi Lekveishvili274cb552025-04-19 21:18:30 +040060 networkDataSecretRef:
61 name: {{ .Values.name }}-network-data
Giorgi Lekveishvili060fcfb2025-04-20 07:14:23 +040062 {{- if .Values.configFiles }}
63 - name: configs
64 configMap:
65 name: configs-{{ .Values.name }}
66 {{- end }}