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

helmchart: allow parameterize storageClass.provisioner #466

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ provisioner chart and their default values.
| classes.[n].storageClass | Create storage class for this class and configure it optionally. | bool/map | `false` |
| classes.[n].storageClass.reclaimPolicy | Specify reclaimPolicy of storage class, available: Delete/Retain. | str | `Delete` |
| classes.[n].storageClass.isDefaultClass | Set storage class as default | bool | `false` |
| classes.[n].storageClass.provisioner | Specify provisioner of storage class. | str | `kubernetes.io/no-provisioner` |
| podAnnotations | Annotations for each Pod in the DaemonSet. | map | `-` |
| podLabels | Labels for each Pod in the DaemonSet. | map | `-` |
| image | Provisioner image. | str | `registry.k8s.io/sig-storage/local-volume-provisioner:v2.5.0` |
Expand Down
6 changes: 5 additions & 1 deletion helm/provisioner/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ metadata:
app.kubernetes.io/name: {{ template "provisioner.name" $ }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
app.kubernetes.io/instance: {{ $.Release.Name }}
provisioner: kubernetes.io/no-provisioner
{{- if kindIs "map" $val.storageClass }}
provisioner: {{ $val.storageClass.provisioner | default "kubernetes.io/no-provisioner" }}
{{- else }}
provisioner: "kubernetes.io/no-provisioner"
{{- end }}
volumeBindingMode: WaitForFirstConsumer
{{- if kindIs "map" $val.storageClass }}
reclaimPolicy: {{ $val.storageClass.reclaimPolicy | default "Delete" }}
Expand Down
12 changes: 8 additions & 4 deletions helm/provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,16 @@ classes:
- "2"
# or blkdiscard utility by uncommenting the line below.
# - "/scripts/blkdiscard.sh"
# Uncomment to create storage class object with default configuration.
# storageClass: true
# Uncomment to create storage class object and configure it.
# storageClass:
# Uncomment to create storage class object with default configuration.
# storageClass: true
# Uncomment to create storage class object and configure it.
# storageClass:
# reclaimPolicy: Delete # Available reclaim policies: Delete/Retain, defaults: Delete.
# isDefaultClass: true # set as default class
# If you are using cluster autoscaler to scale the workload using volume provisioned by this storage class,
# set the provisioner of the storage class to another value other than the default.
# Ref: https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/issues/288
# provisioner: kubernetes.io/no-provisioner

# Defines annotations for each Pod in the DaemonSet.
podAnnotations: {}
Expand Down