pv.j2 694 B

123456789101112131415161718192021222324252627282930313233
  1. apiVersion: v1
  2. kind: PersistentVolume
  3. metadata:
  4. name: {{obj_name}}
  5. {% if annotations is defined %}
  6. annotations:
  7. {% for key,value in annotations.iteritems() %}
  8. {{key}}: {{value}}
  9. {% endfor %}
  10. {% endif %}
  11. {% if labels is defined%}
  12. labels:
  13. {% for key, value in labels.iteritems() %}
  14. {{key}}: {{value}}
  15. {% endfor %}
  16. {% endif %}
  17. spec:
  18. capacity:
  19. storage: {{size}}
  20. accessModes:
  21. {% for mode in access_modes %}
  22. - {{mode}}
  23. {% endfor %}
  24. {{volume_plugin}}:
  25. {% for s in volume_source %}
  26. {{s.key}}: {{s.value}}
  27. {% endfor %}
  28. {% if claim_name is defined%}
  29. claimRef:
  30. name: {{claim_name}}
  31. namespace: {{openshift_provisioners_project}}
  32. {% endif %}
  33. storageClassName: ""