persistent-volume-claim.yml.j2 445 B

123456789101112131415161718
  1. ---
  2. apiVersion: "v1"
  3. kind: "List"
  4. items:
  5. {% for claim in persistent_volume_claims %}
  6. - apiVersion: "v1"
  7. kind: "PersistentVolumeClaim"
  8. metadata:
  9. name: "{{ claim.name }}"
  10. spec:
  11. accessModes: {{ claim.access_modes | lib_utils_to_padded_yaml(2, 2) }}
  12. resources:
  13. requests:
  14. storage: "{{ claim.capacity }}"
  15. {% if claim.storageclass is not none %}
  16. storageClassName: "{{ claim.storageclass }}"
  17. {% endif %}
  18. {% endfor %}