blob: 8e5842afd2d54dcb88eb5cdbe9096b360bdf76ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 }}
readOnly: {{ not (vol.write | default(false)) }}
accessModes:
- {{ vol.access | default('ReadWriteMany') }}
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 %}
|