2022-04-12 06:13:23 +08:00
|
|
|
{% for class in storage_classes %}
|
|
|
|
---
|
|
|
|
kind: StorageClass
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: "{{ class.name }}"
|
|
|
|
annotations:
|
|
|
|
storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) | ternary("true","false") }}"
|
|
|
|
provisioner: storage.csi.upcloud.com
|
2022-09-25 04:18:04 +08:00
|
|
|
reclaimPolicy: Retain
|
2022-05-10 01:43:19 +08:00
|
|
|
parameters:
|
|
|
|
{% for key, value in (class.parameters | default({})).items() %}
|
|
|
|
"{{ key }}": "{{ value }}"
|
|
|
|
{% endfor %}
|
2022-09-25 04:18:04 +08:00
|
|
|
allowVolumeExpansion: {{ class.expand_persistent_volumes | default(true) | ternary("true","false") }}
|
2022-04-12 06:13:23 +08:00
|
|
|
{% endfor %}
|