persistent-volume.yml.j2 389 B

1234567891011121314
  1. ---
  2. apiVersion: v1
  3. kind: List
  4. items:
  5. {% for volume in persistent_volumes %}
  6. - kind: PersistentVolume
  7. metadata:
  8. name: "{{ volume.name }}"
  9. spec:
  10. capacity:
  11. storage: "{{ volume.capacity }}"
  12. accessModes: {{ volume.access_modes | to_padded_yaml(2, 2) }}
  13. {{ volume.storage.keys()[0] }}: {{ volume.storage[volume.storage.keys()[0]] | to_padded_yaml(3, 2) }}
  14. {% endfor %}