Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add option to provision StorageClasses #697

Merged
merged 1 commit into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be really nice if we include the options here similar to the efs PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean like an example? I do have an example storage class entry in comments just like the efs PR. Just that ebs doesn't really need much explicit config. I can provide a more detailed entry I suppose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added reference parameters now. Should we also mention other options like volumeBindingMode & reclaimPolicy?

Copy link
Contributor

@ayberk ayberk Jan 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay here.

Yeah that would be great. Ideally we should note if they're optional and default value if they have one.

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