kubevirt: Fix cloud_init in kubevirt_vm (#52999)

This commit is contained in:
Ondra Machacek 2019-03-01 11:06:17 +01:00 committed by John R Barker
parent ccad79d162
commit b54f2799f1
2 changed files with 6 additions and 4 deletions

View file

@ -255,12 +255,14 @@ class KubeVirtRawModule(KubernetesRawModule):
if machine_type:
template_spec['domain']['machine']['type'] = machine_type
# Define cloud init disk if defined:
self._define_cloud_init(cloud_init_nocloud, template_spec)
# Define disks
self._define_disks(disks, template_spec)
# Define cloud init disk if defined:
# Note, that this must be called after _define_disks, so the cloud_init
# is not first in order and it's not used as boot disk:
self._define_cloud_init(cloud_init_nocloud, template_spec)
# Define interfaces:
self._define_interfaces(interfaces, template_spec)

View file

@ -159,8 +159,8 @@ EXAMPLES = '''
namespace: vms
memory: 1024M
cloud_init_nocloud:
#cloud-config
userData: |-
#cloud-config
password: fedora
chpasswd: { expire: False }
disks: