diff --git a/deploy/chart/local-path-provisioner/README.md b/deploy/chart/local-path-provisioner/README.md index 09963940327ea37548e0c4664ff9b3b54c0088fd..83de1d3bb444f0f8c6eddcb572316bd0bcc4e3f6 100644 --- a/deploy/chart/local-path-provisioner/README.md +++ b/deploy/chart/local-path-provisioner/README.md @@ -61,6 +61,7 @@ default values. | `storageClass.create` | If true, create a `StorageClass` | `true` | | `storageClass.provisionerName` | The provisioner name for the storage class | `nil` | | `storageClass.defaultClass` | If true, set the created `StorageClass` as the cluster's default `StorageClass` | `false` | +| `storageClass.defaultVolumeType` | The default volume type this storage class creates | `local` | | `storageClass.name` | The name to assign the created StorageClass | local-path | | `storageClass.reclaimPolicy` | ReclaimPolicy field of the class | Delete | | `nodePathMap` | Configuration of where to store the data on each node | `[{node: DEFAULT_PATH_FOR_NON_LISTED_NODES, paths: [/opt/local-path-provisioner]}]` | diff --git a/deploy/chart/local-path-provisioner/templates/storageclass.yaml b/deploy/chart/local-path-provisioner/templates/storageclass.yaml index a8d0e14f36237869f9908a04179e41314164f099..d22f7ba78f95af06d25219b67db57472214e6641 100644 --- a/deploy/chart/local-path-provisioner/templates/storageclass.yaml +++ b/deploy/chart/local-path-provisioner/templates/storageclass.yaml @@ -5,10 +5,9 @@ metadata: name: {{ .Values.storageClass.name }} labels: {{ include "local-path-provisioner.labels" . | indent 4 }} -{{- if .Values.storageClass.defaultClass }} - annotations: - storageclass.kubernetes.io/is-default-class: "true" -{{- end }} +annotations: + storageclass.kubernetes.io/is-default-class: "{{ .Values.storageClass.defaultClass }}" + defaultVolumeType: "{{ .Values.storageClass.defaultVolumeType }}" provisioner: {{ template "local-path-provisioner.provisionerName" . }} volumeBindingMode: {{ .Values.storageClass.volumeBindingMode }} reclaimPolicy: {{ .Values.storageClass.reclaimPolicy }} diff --git a/deploy/chart/local-path-provisioner/values.yaml b/deploy/chart/local-path-provisioner/values.yaml index 96550935f5ac2e089ecb6b71e9d12a8f6eda19ca..aef72ad9bea12e56518528daee1b38edf3bdfc6b 100644 --- a/deploy/chart/local-path-provisioner/values.yaml +++ b/deploy/chart/local-path-provisioner/values.yaml @@ -34,6 +34,9 @@ storageClass: ## Ignored if storageClass.create is false defaultClass: false + ## The default volume type this storage class creates, can be "local" or "hostPath" + defaultVolumeType: local + ## Set a StorageClass name ## Ignored if storageClass.create is false name: local-path