[vm-instance] Add bus option; Always specify bootOrder

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil
2025-07-08 17:47:34 +02:00
parent 699d38d8b9
commit 1079472a2a
4 changed files with 14 additions and 13 deletions

View File

@@ -174,7 +174,7 @@ vm-instance 0.7.0 6130f43d
vm-instance 0.7.2 632224a3
vm-instance 0.8.0 4369b031
vm-instance 0.9.0 70f82667
vm-instance 0.9.1 HEAD
vm-instance 0.10.0 HEAD
vpn 0.1.0 263e47be
vpn 0.2.0 53f2365e
vpn 0.3.0 6c5cf5bf

View File

@@ -17,10 +17,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.9.1
version: 0.10.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.8.0
appVersion: 0.10.0

View File

@@ -54,24 +54,24 @@ spec:
disks:
{{- range $i, $disk := .Values.disks }}
- name: disk-{{ $disk.name }}
{{- $disk := lookup "cdi.kubevirt.io/v1beta1" "DataVolume" $.Release.Namespace (printf "vm-disk-%s" $disk.name) }}
{{- if $disk }}
{{- if and (hasKey $disk.metadata.annotations "vm-disk.cozystack.io/optical") (eq (index $disk.metadata.annotations "vm-disk.cozystack.io/optical") "true") }}
cdrom: {}
{{- $dv := lookup "cdi.kubevirt.io/v1beta1" "DataVolume" $.Release.Namespace (printf "vm-disk-%s" $disk.name) }}
{{- if $dv }}
{{- if and (hasKey $dv.metadata.annotations "vm-disk.cozystack.io/optical") (eq (index $dv.metadata.annotations "vm-disk.cozystack.io/optical") "true") }}
cdrom:
{{- else }}
disk: {}
{{- end }}
{{- if eq $i 0 }}
bootOrder: 1
disk:
{{- end }}
{{- with $disk.bus }}
bus: {{ . }}
{{- end }}
bootOrder: {{ add $i 1 }}
{{- else }}
{{- fail (printf "Specified disk not exists in cluster: %s" .name) }}
{{- end }}
{{- end }}
{{- if or .Values.sshKeys .Values.cloudInit }}
- name: cloudinitdisk
disk:
bus: virtio
disk: {}
{{- end }}
interfaces:
- name: default

View File

@@ -22,6 +22,7 @@ instanceProfile: ubuntu
## disks:
## - name: example-system
## - name: example-data
## bus: sata
disks: []
## @param gpus [array] List of GPUs to attach