kubevirt_vm: Prevent unnecessary whitespace

This removes the unnecessary whitespace from the rendered VirtualMachine
template and adds a unit test for it.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
Felix Matouschek
2023-07-18 14:01:24 +02:00
parent 472bd8d917
commit 0875abc080
2 changed files with 28 additions and 6 deletions

View File

@@ -284,11 +284,11 @@ spec:
{% if instancetype %}
instancetype:
{{ instancetype | to_yaml | indent(4) }}
{% endif %}
{%- endif %}
{% if preference %}
preference:
{{ preference | to_yaml | indent(4) }}
{% endif %}
{%- endif %}
{% if data_volume_templates %}
dataVolumeTemplates:
{{ data_volume_templates | to_yaml | indent(4) }}