2019-11-01 07:59:24 +00:00
|
|
|
{% for class in storage_classes %}
|
|
|
|
---
|
|
|
|
kind: StorageClass
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: "{{ class.name }}"
|
|
|
|
annotations:
|
2020-04-28 07:12:04 +00:00
|
|
|
storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) | ternary("true","false") }}"
|
2019-11-01 07:59:24 +00:00
|
|
|
provisioner: cinder.csi.openstack.org
|
2020-04-28 07:12:04 +00:00
|
|
|
volumeBindingMode: WaitForFirstConsumer
|
2019-11-01 07:59:24 +00:00
|
|
|
parameters:
|
|
|
|
{% for key, value in (class.parameters | default({})).items() %}
|
|
|
|
"{{ key }}": "{{ value }}"
|
|
|
|
{% endfor %}
|
2020-02-26 13:12:25 +00:00
|
|
|
{% if cinder_topology is defined and cinder_topology is sameas true %}
|
|
|
|
allowedTopologies:
|
|
|
|
- matchLabelExpressions:
|
|
|
|
- key: topology.cinder.csi.openstack.org/zone
|
|
|
|
values:
|
|
|
|
{% for zone in cinder_topology_zones %}
|
|
|
|
- "{{ zone }}"
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2020-06-05 15:27:43 +00:00
|
|
|
allowVolumeExpansion: {{ expand_persistent_volumes }}
|
2019-11-01 07:59:24 +00:00
|
|
|
{% endfor %}
|