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 Feb 4, 2021
1 parent b09b67a commit 42dfe27
Show file tree
Hide file tree
Showing 3 changed files with 26 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
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "0.9.0"
appVersion: "0.9.1"
name: aws-ebs-csi-driver
description: A Helm chart for AWS EBS CSI Driver
version: 0.9.0
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 }}
10 changes: 10 additions & 0 deletions charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,13 @@ serviceAccount:
create: true
name: ebs-snapshot-controller
annotations: {}

storageClasses: []
# Add StorageClass resources like:
# - name: ebs-sc
# # defaults to WaitForFirstConsumer
# volumeBindingMode: WaitForFirstConsumer
# # defaults to Delete
# reclaimPolicy: Retain
# parameters:
# encrypted: "true"

0 comments on commit 42dfe27

Please sign in to comment.