blob: 354561432a46cad2ae88f598ca57b30bd7607b5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
---
apiVersion: v1
kind: List
items:
{% for volume in persistent_volumes %}
- apiVersion: v1
kind: PersistentVolume
metadata:
name: "{{ volume.name }}"
{% if volume.labels is defined and volume.labels is mapping %}
labels:
{% for key,value in volume.labels.items() %}
{{ key }}: {{ value }}
{% endfor %}
{% endif %}
spec:
capacity:
storage: "{{ volume.capacity }}"
accessModes: {{ volume.access_modes | lib_utils_to_padded_yaml(2, 2) }}
{{ (volume.storage.keys() | list)[0] }}: {{ volume.storage[(volume.storage.keys() | list)[0]] | lib_utils_to_padded_yaml(3, 2) }}
{% endfor %}
|