5151 {{- else if eq .Values.systemDisk.image "ubuntu" }}
5252 url : https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
5353 {{- else if eq .Values.systemDisk.image "fedora" }}
54- url : https://download.fedoraproject.org/pub/fedora/linux/releases/40 /Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40 -1.14 .qcow2
54+ url : https://download.fedoraproject.org/pub/fedora/linux/releases/42 /Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42 -1.1.x86_64 .qcow2
5555 {{- else if eq .Values.systemDisk.image "alpine" }}
56- url : https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2 -x86_64-bios-tiny -r0.qcow2
56+ url : https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.8 -x86_64-bios-cloudinit -r0.qcow2
5757 {{- else if eq .Values.systemDisk.image "talos" }}
5858 url : https://github.com/siderolabs/talos/releases/download/v1.7.6/nocloud-amd64.raw.xz
5959 {{- end }}
9393 - disk :
9494 bus : scsi
9595 name : systemdisk
96- {{- if or .Values.cloudInit .Values.sshKeys }}
96+ {{- if or .Values.cloudInit .Values.sshKeys (and .Values.subnets (or (eq .Values.systemDisk.image "ubuntu") (eq .Values.systemDisk.image "alpine"))) }}
9797 - disk :
9898 bus : virtio
9999 name : cloudinitdisk
@@ -102,6 +102,12 @@ spec:
102102 interfaces :
103103 - name : default
104104 bridge : {}
105+ {{- if .Values.subnets }}
106+ {{- range $i, $subnet := .Values.subnets }}
107+ - name : {{ $subnet.name }}
108+ bridge : {}
109+ {{- end }}
110+ {{- end }}
105111
106112 machine :
107113 type : " "
@@ -123,13 +129,26 @@ spec:
123129 - name : systemdisk
124130 dataVolume :
125131 name : {{ include "virtual-machine.fullname" . }}
126- {{- if or .Values.cloudInit .Values.sshKeys }}
132+ {{- if or .Values.cloudInit .Values.sshKeys (and .Values.subnets (or (eq .Values.systemDisk.image "ubuntu") (eq .Values.systemDisk.image "alpine"))) }}
127133 - name : cloudinitdisk
128134 cloudInitNoCloud :
135+ {{- if or .Values.cloudInit .Values.sshKeys }}
129136 secretRef :
130137 name : {{ include "virtual-machine.fullname" . }}-cloud-init
138+ {{- end }}
139+ {{- if and .Values.subnets (or (eq .Values.systemDisk.image "ubuntu") (eq .Values.systemDisk.image "alpine")) }}
140+ networkDataSecretRef :
141+ name : {{ include "virtual-machine.fullname" . }}-network-config
142+ {{- end }}
131143 {{- end }}
132144
133145 networks :
134146 - name : default
135147 pod : {}
148+ {{- if .Values.subnets }}
149+ {{- range $i, $subnet := .Values.subnets }}
150+ - name : {{ $subnet.name }}
151+ multus :
152+ networkName : {{ $.Release.Namespace }}/{{ $subnet.name }}
153+ {{- end }}
154+ {{- end }}
0 commit comments