summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/templates/00-gfs-volumes.yml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ands_kaas/templates/00-gfs-volumes.yml.j2')
-rw-r--r--roles/ands_kaas/templates/00-gfs-volumes.yml.j26
1 files changed, 4 insertions, 2 deletions
diff --git a/roles/ands_kaas/templates/00-gfs-volumes.yml.j2 b/roles/ands_kaas/templates/00-gfs-volumes.yml.j2
index c90c610..c9341ed 100644
--- a/roles/ands_kaas/templates/00-gfs-volumes.yml.j2
+++ b/roles/ands_kaas/templates/00-gfs-volumes.yml.j2
@@ -6,8 +6,10 @@ metadata:
annotations:
descriptions: "KATRIN Volumes"
objects:
-{% for name, vol in (kaas_project_config.volumes | default(kaas_openshift_volumes)).iteritems() %}
+{% for name, vol in kaas_project_volumes.iteritems() %}
{% set oc_name = vol.name | default(name) | regex_replace('_','-') %}
+{% set cfgpath = vol.path | default("") %}
+{% set path = cfgpath if cfgpath[:1] == "/" else "/" + kaas_project + "/" + cfgpath %}
- apiVersion: v1
kind: PersistentVolume
metadata:
@@ -16,7 +18,7 @@ objects:
persistentVolumeReclaimPolicy: Retain
glusterfs:
endpoints: {{ kaas_glusterfs_endpoints }}
- path: "{{ vol.volume }}{{vol.path}}"
+ path: "{{ vol.volume }}{{path}}"
readOnly: {{ not (vol.write | default(false)) }}
accessModes:
- {{ vol.access | default(vol.write | default(false) | ternary('ReadWriteMany', 'ReadOnlyMany')) }}