VirtualMachines: Support auto creation of the config files
Mount using virtiofs
Change-Id: I77c5282b7bb1ad55df6ddfe0e4e53757b94f11e8
diff --git a/charts/virtual-machine/templates/vm.yaml b/charts/virtual-machine/templates/vm.yaml
index 3a0a446..a0d19e5 100644
--- a/charts/virtual-machine/templates/vm.yaml
+++ b/charts/virtual-machine/templates/vm.yaml
@@ -38,6 +38,14 @@
disk:
bus: virtio
readonly: true
+ {{- if .Values.configFiles }}
+ # TODO(gio): switch to filesystems for real-time updates
+ - name: configs
+ disk:
+ bus: virtio
+ readonly: true
+ serial: DODOCONFIGFILES
+ {{- end }}
networks:
- name: default
pod: {}
@@ -51,3 +59,8 @@
name: {{ .Values.name }}-user-data
networkDataSecretRef:
name: {{ .Values.name }}-network-data
+ {{- if .Values.configFiles }}
+ - name: configs
+ configMap:
+ name: configs-{{ .Values.name }}
+ {{- end }}