pvc.j2 556 B

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