summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-10-06 04:44:25 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-10-06 04:44:25 +0200
commit4f509f9faad0e463cbc5dcac057c4da0fda3e969 (patch)
tree870ab41a60ee813eaad4fa76ec0b4f4c768c06d8 /roles/ands_kaas/templates/50-kaas-app-pods.yml.j2
parentacd54ba601e34dafac063f94054bb80348e73dcd (diff)
downloadands-4f509f9faad0e463cbc5dcac057c4da0fda3e969.tar.gz
ands-4f509f9faad0e463cbc5dcac057c4da0fda3e969.tar.bz2
ands-4f509f9faad0e463cbc5dcac057c4da0fda3e969.tar.xz
ands-4f509f9faad0e463cbc5dcac057c4da0fda3e969.zip
Support mounting configMaps and secrets in KaaS pods
Diffstat (limited to 'roles/ands_kaas/templates/50-kaas-app-pods.yml.j2')
-rw-r--r--roles/ands_kaas/templates/50-kaas-app-pods.yml.j215
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2 b/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2
index 76ba6eb..7f82836 100644
--- a/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2
+++ b/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2
@@ -229,6 +229,16 @@ objects:
hostPath:
path: {{ vol.path }}
{% endfor %}
+ {% for vol in (img.configs | default([])) %}
+ - name: cfg-{{imgidx}}-{{loop.index}}
+ {% if (vol.secret | default(false)) | bool %}
+ secret:
+ secretName: {{vol.name}}
+ {% else %}
+ configMap:
+ name: {{vol.name}}
+ {% endif %}
+ {% endfor %}
{% endfor %}
{% endif %}
{% if (pod.groups is defined) or (pod.run_as is defined) %}
@@ -327,6 +337,10 @@ objects:
- name: host-{{imgidx}}-{{loop.index}}
mountPath: {{ vol.mount }}
{% endfor %}
+ {% for vol in (img.configs | default([])) %}
+ - name: cfg-{{imgidx}}-{{loop.index}}
+ mountPath: {{ vol.mount }}
+ {% endfor %}
{% endif %}
{% if img.resources is defined %}
resources:
@@ -364,6 +378,7 @@ objects:
{{ type }}:
timeoutSeconds: {{ probe.timeout | default(1) }}
initialDelaySeconds: {{ probe.delay | default(10) }}
+ periodSeconds: {{ probe.period | default(60) }}
{% if (probe.command is defined) %}
exec:
command: {{ probe.command | to_json }}