summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics/templates/pvc.j2
blob: 9a4b428ec71bd67895006f131d17757dcb810ce9 (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
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: "{{obj_name}}"
{% if labels is not defined %}
  labels:
    metrics-infra: support
{% elif labels %}
  labels:
{% for key, value in labels.items() %}
    {{ key }}: {{ value }}
{% endfor %}
{% endif %}
{% if annotations is defined and annotations %}
  annotations:
{% for key,value in annotations.items() %}
    {{key}}: {{value}}
{% endfor %}
{% endif %}
spec:
{% if pv_selector is defined and pv_selector is mapping %}
  selector:
    matchLabels:
{% for key,value in pv_selector.items() %}
      {{key}}: {{value}}
{% endfor %}
{% endif %}
  accessModes:
{% for mode in access_modes %}
    - {{ mode }}
{% endfor %}
  resources:
    requests:
      storage: {{size}}
{% if storage_class_name is defined %}
  storageClassName: {{ storage_class_name }}
{% endif %}