pvc.j2 659 B

123456789101112131415161718192021222324252627282930
  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.items() %}
  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.items() %}
  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}}
  28. {% if storage_class_name is defined %}
  29. storageClassName: {{ storage_class_name }}
  30. {% endif %}