2018-02-14 17:17:06 +08:00
|
|
|
{% for class in storage_classes %}
|
|
|
|
---
|
|
|
|
kind: StorageClass
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: "{{ class.name }}"
|
|
|
|
annotations:
|
2018-02-15 17:51:42 +08:00
|
|
|
storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) | ternary("true","false") }}"
|
2018-02-14 17:17:06 +08:00
|
|
|
provisioner: kubernetes.io/cinder
|
|
|
|
parameters:
|
|
|
|
{% for key, value in (class.parameters | default({})).items() %}
|
|
|
|
"{{ key }}": "{{ value }}"
|
|
|
|
{% endfor %}
|
2019-04-04 17:36:50 +08:00
|
|
|
allowVolumeExpansion: {{ expand_persistent_volumes }}
|
2018-02-14 17:17:06 +08:00
|
|
|
{% endfor %}
|