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.

23 lines
661 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) }}"
  9. provisioner: cinder.csi.openstack.org
  10. parameters:
  11. {% for key, value in (class.parameters | default({})).items() %}
  12. "{{ key }}": "{{ value }}"
  13. {% endfor %}
  14. {% if cinder_topology is defined and cinder_topology is sameas true %}
  15. allowedTopologies:
  16. - matchLabelExpressions:
  17. - key: topology.cinder.csi.openstack.org/zone
  18. values:
  19. {% for zone in cinder_topology_zones %}
  20. - "{{ zone }}"
  21. {% endfor %}
  22. {% endif %}
  23. {% endfor %}