Skip to content

Commit

Permalink
feat: Add option to provision StorageClasses
Browse files Browse the repository at this point in the history
Most application charts don't usually create `StorageClass`es. They create PVCs.
  • Loading branch information
gazal-k committed Jan 14, 2021
1 parent 1d66536 commit 0788526
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.8.1"
name: aws-ebs-csi-driver
description: A Helm chart for AWS EBS CSI Driver
version: 0.8.2
version: 0.8.3
kubeVersion: ">=1.14.0-0"
home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver
sources:
Expand Down
15 changes: 15 additions & 0 deletions charts/aws-ebs-csi-driver/templates/storageclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- range .Values.storageClasses }}
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ .name }}
provisioner: ebs.csi.aws.com
volumeBindingMode: {{ default "WaitForFirstConsumer" .volumeBindingMode }}
{{- if hasKey . "reclaimPolicy" }}
reclaimPolicy: {{ .reclaimPolicy }}
{{- end }}
{{- with .parameters }}
parameters:
{{ toYaml . | indent 2 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ serviceAccount:
create: true
name: ebs-snapshot-controller
annotations: {}

storageClasses: []
# Add StorageClass resources like:
# - name: ebs-sc

0 comments on commit 0788526

Please sign in to comment.