You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
837 B

  1. {% for class in storage_classes %}
  2. ---
  3. kind: StorageClass
  4. apiVersion: storage.k8s.io/v1
  5. metadata:
  6. name: "{{ class.name }}"
  7. annotations:
  8. storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) | ternary("true","false") }}"
  9. provisioner: kubernetes.io/cinder
  10. {% if class.mount_options is defined %}
  11. mountOptions:
  12. {% for option in class.mount_options | default([]) %}
  13. - "{{ option }}"
  14. {% endfor %}
  15. {% endif %}
  16. parameters:
  17. {% for key, value in (class.parameters | default({})).items() %}
  18. "{{ key }}": "{{ value }}"
  19. {% endfor %}
  20. {% if class.reclaim_policy is defined %}
  21. reclaimPolicy: "{{ class.reclaim_policy }}"
  22. {% endif %}
  23. {% if class.volume_binding_mode is defined %}
  24. volumeBindingMode: "{{ class.volume_binding_mode }}"
  25. {% endif %}
  26. allowVolumeExpansion: {{ expand_persistent_volumes }}
  27. {% endfor %}