Fix volume generation for init containers
Change-Id: Ieedfca16f7fbee75a423b83eaedac552cdf46524
diff --git a/kubernetes/files/rc.yml b/kubernetes/files/rc.yml
index 0e80393..59f391b 100644
--- a/kubernetes/files/rc.yml
+++ b/kubernetes/files/rc.yml
@@ -1,4 +1,4 @@
-{% from "kubernetes/map.jinja" import control with context %}
+Q{% from "kubernetes/map.jinja" import control with context %}
apiVersion: {{ service.apiVersion }}
kind: {{ service.kind }}
metadata:
@@ -28,8 +28,8 @@
"command": [{%- for command in container.command %}"{{ command }}"{% if not loop.last %},{% endif %}{%- endfor %}]
{%- if container.volumes is defined -%}
,
- {%- for volume in container.volumes %}
"volumeMounts": [
+ {%- for volume in container.volumes %}
{
"name": "{{ volume.name }}",
{%- if volume.sub_path is defined %}
@@ -37,8 +37,8 @@
{%- endif %}
"mountPath": "{{ volume.mount }}"
}
- ]
{%- if not loop.last %},{% endif %}{%- endfor %}
+ ]
{%- endif %}
}
{%- if not loop.last %},{% endif %}{% endfor %}