Skip to content
Open
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
14 changes: 14 additions & 0 deletions deploy/chart/local-path-provisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ default values.
| `nodeSelector` | Node labels for Local Path Provisioner pod assignment | `{}` |
| `tolerations` | Node taints to tolerate | `[]` |
| `affinity` | Pod affinity | `{}` |
| `priorityClassName` | Priority class name for the main provisioner pod | `""` |
| `configmap.helperPod.priorityClassName` | Priority class name for the helper pod | `"system-node-critical"` |
| `configmap.setup` | Configuration of script to execute setup operations on each node | #!/bin/sh<br>while getopts "m:s:p:" opt<br>do<br>&emsp;case $opt in <br>&emsp;&emsp;p)<br>&emsp;&emsp;absolutePath=$OPTARG<br>&emsp;&emsp;;;<br>&emsp;&emsp;s)<br>&emsp;&emsp;sizeInBytes=$OPTARG<br>&emsp;&emsp;;;<br>&emsp;&emsp;m)<br>&emsp;&emsp;volMode=$OPTARG<br>&emsp;&emsp;;;<br>&emsp;esac<br>done<br>mkdir -m 0777 -p ${absolutePath} |
| `configmap.teardown` | Configuration of script to execute teardown operations on each node | #!/bin/sh<br>while getopts "m:s:p:" opt<br>do<br>&emsp;case $opt in <br>&emsp;&emsp;p)<br>&emsp;&emsp;absolutePath=$OPTARG<br>&emsp;&emsp;;;<br>&emsp;&emsp;s)<br>&emsp;&emsp;sizeInBytes=$OPTARG<br>&emsp;&emsp;;;<br>&emsp;&emsp;m)<br>&emsp;&emsp;volMode=$OPTARG<br>&emsp;&emsp;;;<br>&emsp;esac<br>done<br>rm -rf ${absolutePath} |
| `configmap.name` | configmap name | `local-path-config` |
Expand All @@ -86,6 +88,18 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm
$ helm install ./deploy/chart/local-path-provisioner --name local-path-storage --namespace local-path-storage --set storageClass.provisionerName=rancher.io/local-path
```

To set a priority class for the provisioner pod:

```console
$ helm install ./deploy/chart/local-path-provisioner --name local-path-storage --namespace local-path-storage --set priorityClassName=high-priority
```

To set different priority classes for both main and helper pods:

```console
$ helm install ./deploy/chart/local-path-provisioner --name local-path-storage --namespace local-path-storage --set priorityClassName=high-priority --set configmap.helperPod.priorityClassName=system-cluster-critical
```

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
chart. For example,

Expand Down
4 changes: 3 additions & 1 deletion deploy/chart/local-path-provisioner/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ data:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
priorityClassName: system-node-critical
{{- if .Values.configmap.helperPod.priorityClassName }}
priorityClassName: {{ .Values.configmap.helperPod.priorityClassName }}
{{- end }}
tolerations:
- key: node.kubernetes.io/disk-pressure
operator: Exists
Expand Down
3 changes: 3 additions & 0 deletions deploy/chart/local-path-provisioner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "local-path-provisioner.serviceAccountName" . }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
5 changes: 5 additions & 0 deletions deploy/chart/local-path-provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ tolerations: []

affinity: {}

# Priority class name for the pod
priorityClassName: ""

podDisruptionBudget:
enabled: false

Expand All @@ -167,6 +170,8 @@ configmap:
name: "helper-pod"
annotations: {}
tolerations: []
# Priority class name for the helper pod (defaults to system-node-critical)
priorityClassName: "system-node-critical"
# Number of provisioner worker threads to call provision/delete simultaneously.
# workerThreads: 4

Expand Down