Skip to content

Commit 58a077d

Browse files
lizzzcaiderekbit
authored andcommitted
add storageClass.allowedTopologies in helm chart.
Signed-off-by: Lize Cai <lize.cai@sap.com>
1 parent bbe20b2 commit 58a077d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

deploy/chart/local-path-provisioner/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ default values.
6565
| `storageClass.defaultVolumeType` | The default volume type this storage class creates | `hostPath` |
6666
| `storageClass.name` | The name to assign the created StorageClass | local-path |
6767
| `storageClass.reclaimPolicy` | ReclaimPolicy field of the class | Delete |
68+
| `storageClass.volumeBindingMode` | volumeBindingMode field of the class | `WaitForFirstConsumer` |
69+
| `storageClass.allowedTopologies` | allowedTopologies field of the class | `[]` |
6870
| `storageClass.pathPattern` | Template for the volume directory name | `nil` |
6971
| `nodePathMap` | Configuration of where to store the data on each node | `[{node: DEFAULT_PATH_FOR_NON_LISTED_NODES, paths: [/opt/local-path-provisioner]}]` |
7072
| `resources` | Local Path Provisioner resource requests & limits | `{}` |

deploy/chart/local-path-provisioner/templates/storageclass.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ provisioner: {{ template "local-path-provisioner.provisionerName" $dot }}
2020
volumeBindingMode: {{ $values.storageClass.volumeBindingMode }}
2121
reclaimPolicy: {{ $values.storageClass.reclaimPolicy }}
2222
allowVolumeExpansion: true
23+
{{- if $values.storageClass.allowedTopologies }}
24+
allowedTopologies:
25+
{{ toYaml $values.storageClass.allowedTopologies | indent 0 }}
26+
{{- end }}
2327
{{- if $values.storageClass.pathPattern }}
2428
parameters:
2529
pathPattern: {{ $values.storageClass.pathPattern | quote }}
26-
{{ end -}}
30+
{{- end }}
2731
{{- end }}
2832
---
2933
{{- end }}

deploy/chart/local-path-provisioner/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ storageClass:
4949
## volumeBindingMode field controls when volume binding and dynamic provisioning should occur, can be "Immediate" or "WaitForFirstConsumer"
5050
volumeBindingMode: WaitForFirstConsumer
5151

52+
## allowedTopologies field controls on which nodes the volumes can be dynamically provisioned, an empty value means no topology constraints
53+
allowedTopologies: []
54+
5255
## Set a path pattern, if unset the default will be used
5356
# pathPattern: "{{ .PVC.Namespace }}-{{ .PVC.Name }}"
5457

0 commit comments

Comments
 (0)