From ca5b5b005d2ca454015f8b0faa54372c60a0e40a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 23 Feb 2018 02:16:43 +0100 Subject: GlusterFS subpaths, ADEI frontend pods, fixes --- roles/ands_kaas/templates/00-gfs-volumes.yml.j2 | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 roles/ands_kaas/templates/00-gfs-volumes.yml.j2 (limited to 'roles/ands_kaas/templates/00-gfs-volumes.yml.j2') diff --git a/roles/ands_kaas/templates/00-gfs-volumes.yml.j2 b/roles/ands_kaas/templates/00-gfs-volumes.yml.j2 new file mode 100644 index 0000000..c90c610 --- /dev/null +++ b/roles/ands_kaas/templates/00-gfs-volumes.yml.j2 @@ -0,0 +1,39 @@ +--- +apiVersion: v1 +kind: Template +metadata: + name: + annotations: + descriptions: "KATRIN Volumes" +objects: +{% for name, vol in (kaas_project_config.volumes | default(kaas_openshift_volumes)).iteritems() %} +{% set oc_name = vol.name | default(name) | regex_replace('_','-') %} + - apiVersion: v1 + kind: PersistentVolume + metadata: + name: {{ oc_name }} + spec: + persistentVolumeReclaimPolicy: Retain + glusterfs: + endpoints: {{ kaas_glusterfs_endpoints }} + path: "{{ vol.volume }}{{vol.path}}" + readOnly: {{ not (vol.write | default(false)) }} + accessModes: + - {{ vol.access | default(vol.write | default(false) | ternary('ReadWriteMany', 'ReadOnlyMany')) }} + capacity: + storage: {{ vol.capacity | default(kaas_default_volume_capacity) }} + claimRef: + name: {{ oc_name }} + namespace: {{ kaas_project }} + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: {{ oc_name }} + spec: + volumeName: {{ oc_name }} + accessModes: + - {{ vol.access | default('ReadWriteMany') }} + resources: + requests: + storage: {{ vol.capacity | default(kaas_default_volume_capacity) }} +{% endfor %} -- cgit v1.2.3