apiVersion: v1
kind: PersistentVolume
metadata:
  name: {{obj_name}}
{% if annotations is defined %}
  annotations:
{% for key,value in annotations.items() %}
    {{key}}: {{value}}
{% endfor %}
{% endif %}
{% if labels is defined%}
  labels:
{% for key, value in labels.items() %}
    {{key}}: {{value}}
{% endfor %}
{% endif %}
spec:
  capacity:
    storage: {{size}}
  accessModes:
{% for mode in access_modes %}
    - {{mode}}
{% endfor %}
  {{volume_plugin}}:
{% for s in volume_source %}
    {{s.key}}: {{s.value}}
{% endfor %}
{% if claim_name is defined%}
  claimRef:
    name: {{claim_name}}
    namespace: {{openshift_provisioners_project}}
{% endif %}
  storageClassName: ""
