pvc.j2 573 B

123456789101112131415161718192021222324252627
  1. apiVersion: v1
  2. kind: PersistentVolumeClaim
  3. metadata:
  4. name: "{{obj_name}}"
  5. labels:
  6. logging-infra: support
  7. {% if annotations is defined %}
  8. annotations:
  9. {% for key,value in annotations.iteritems() %}
  10. {{key}}: {{value}}
  11. {% endfor %}
  12. {% endif %}
  13. spec:
  14. {% if pv_selector is defined and pv_selector is mapping %}
  15. selector:
  16. matchLabels:
  17. {% for key,value in pv_selector.iteritems() %}
  18. {{key}}: {{value}}
  19. {% endfor %}
  20. {% endif %}
  21. accessModes:
  22. {% for mode in access_modes %}
  23. - {{ mode }}
  24. {% endfor %}
  25. resources:
  26. requests:
  27. storage: {{size}}