Skip to content

Commit

Permalink
Enable optional storageclasses.
Browse files Browse the repository at this point in the history
  • Loading branch information
powellchristoph committed Apr 19, 2024
1 parent dab0f06 commit 9c7e025
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/cinder-csi-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Deploys a Cinder csi provisioner to your cluster, with the appropriate storageClass.

## How To install
- Enable deployment of storageclasses using `storageClass.enabled`
- Enable deployment of retain or delete class using `storageClass.<name>.enabled`
- Tag the retain or delete class as default class using `storageClass.delete.isDefault` in your value yaml
- Set `storageClass.<reclaim-policy>.allowVolumeExpansion` to `true` or `false`

Expand Down
5 changes: 4 additions & 1 deletion charts/cinder-csi-plugin/templates/storageclass.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.storageClass.enabled }}
{{- if .Values.storageClass.delete.enabled }}
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
Expand All @@ -10,6 +11,8 @@ metadata:
provisioner: cinder.csi.openstack.org
reclaimPolicy: Delete
allowVolumeExpansion: {{ .Values.storageClass.delete.allowVolumeExpansion }}
{{- end }}
{{- if .Values.storageClass.retain.enabled }}
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
Expand Down
3 changes: 2 additions & 1 deletion charts/cinder-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,12 @@ secret:
# ca-file=/etc/cacert/ca-bundle.crt

storageClass:
enabled: true
delete:
enabled: false
isDefault: false
allowVolumeExpansion: true
retain:
enabled: false
isDefault: false
allowVolumeExpansion: true
# any kind of custom StorageClasses
Expand Down

0 comments on commit 9c7e025

Please sign in to comment.