Skip to content

Commit 6d6d225

Browse files
authored
Merge pull request #33 from kir4h/local-path-provisioner
Sync local-path-provisioner Helm chart to version 0.0.33
2 parents 7f91c97 + 3fa0bcb commit 6d6d225

9 files changed

Lines changed: 57 additions & 11 deletions

File tree

charts/local-path-provisioner/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
22
description: Use HostPath for persistent local storage with Kubernetes
33
name: local-path-provisioner
4-
version: 0.0.32
5-
appVersion: "v0.0.32"
4+
version: 0.0.33
5+
appVersion: "v0.0.33"
66
keywords:
77
- storage
88
- hostpath

charts/local-path-provisioner/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,16 @@ default values.
5757
| ----------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
5858
| `commonLabels` | Custom labels to apply to all resources | `{}` |
5959
| `image.repository` | Local Path Provisioner image name | `rancher/local-path-provisioner` |
60-
| `image.tag` | Local Path Provisioner image tag | `v0.0.32` . |
60+
| `image.tag` | Local Path Provisioner image tag | `v0.0.33` . |
6161
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
6262
| `storageClass.create` | If true, create a `StorageClass` | `true` |
6363
| `storageClass.provisionerName` | The provisioner name for the storage class | `nil` |
6464
| `storageClass.defaultClass` | If true, set the created `StorageClass` as the cluster's default `StorageClass` | `false` |
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 | `{}` |
@@ -74,6 +76,9 @@ default values.
7476
| `nodeSelector` | Node labels for Local Path Provisioner pod assignment | `{}` |
7577
| `tolerations` | Node taints to tolerate | `[]` |
7678
| `affinity` | Pod affinity | `{}` |
79+
| `podDisruptionBudget` | Pod disruption budget | `{enabled: false}` |
80+
| `priorityClassName` | Priority class name for the main provisioner pod | `""` |
81+
| `configmap.helperPod.priorityClassName` | Priority class name for the helper pod | `"system-node-critical"` |
7782
| `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} |
7883
| `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} |
7984
| `configmap.name` | configmap name | `local-path-config` |
@@ -86,6 +91,18 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm
8691
$ helm install ./deploy/chart/local-path-provisioner --name local-path-storage --namespace local-path-storage --set storageClass.provisionerName=rancher.io/local-path
8792
```
8893

94+
To set a priority class for the provisioner pod:
95+
96+
```console
97+
$ helm install ./deploy/chart/local-path-provisioner --name local-path-storage --namespace local-path-storage --set priorityClassName=high-priority
98+
```
99+
100+
To set different priority classes for both main and helper pods:
101+
102+
```console
103+
$ 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
104+
```
105+
89106
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
90107
chart. For example,
91108

charts/local-path-provisioner/templates/clusterrole.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ metadata:
77
{{ include "local-path-provisioner.labels" . | indent 4 }}
88
rules:
99
- apiGroups: [""]
10-
resources: ["nodes", "persistentvolumeclaims", "configmaps", "pods", "pods/log"]
10+
resources: ["nodes", "configmaps", "pods", "pods/log"]
1111
verbs: ["get", "list", "watch"]
12+
- apiGroups: [""]
13+
resources: ["persistentvolumeclaims"]
14+
verbs: ["get", "list", "watch", "update"]
1215
- apiGroups: [""]
1316
resources: ["persistentvolumes"]
1417
verbs: ["get", "list", "watch", "create", "patch", "update", "delete"]

charts/local-path-provisioner/templates/clusterrolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ roleRef:
1212
subjects:
1313
- kind: ServiceAccount
1414
name: {{ template "local-path-provisioner.serviceAccountName" . }}
15-
namespace: {{ .Release.Namespace }}
15+
namespace: {{ include "local-path-provisioner.namespace" . }}
1616
{{- end -}}

charts/local-path-provisioner/templates/configmap.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ data:
4343
annotations:
4444
{{- toYaml . | nindent 8 }}
4545
{{- end }}
46+
labels:
47+
{{ include "local-path-provisioner.labels" . | indent 8 }}
4648
spec:
47-
priorityClassName: system-node-critical
49+
{{- if .Values.configmap.helperPod.priorityClassName }}
50+
priorityClassName: {{ .Values.configmap.helperPod.priorityClassName }}
51+
{{- end }}
4852
tolerations:
4953
- key: node.kubernetes.io/disk-pressure
5054
operator: Exists

charts/local-path-provisioner/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ spec:
2525
{{- toYaml . | nindent 8 }}
2626
{{- end }}
2727
serviceAccountName: {{ template "local-path-provisioner.serviceAccountName" . }}
28+
{{- if .Values.priorityClassName }}
29+
priorityClassName: {{ .Values.priorityClassName }}
30+
{{- end }}
31+
hostUsers: {{ .Values.hostUsers }}
2832
securityContext:
2933
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3034
containers:

charts/local-path-provisioner/templates/pdb.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ spec:
1111
matchLabels:
1212
app.kubernetes.io/name: {{ include "local-path-provisioner.name" . }}
1313
app.kubernetes.io/instance: {{ .Release.Name }}
14-
{{- toYaml (omit .Values.podDisruptionBudget "enabled") | indent 2 }}
15-
{{- end -}}
14+
{{ toYaml (omit .Values.podDisruptionBudget "enabled") | nindent 2 }}
15+
{{- end }}

charts/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 }}

charts/local-path-provisioner/values.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespaceOverride: ""
66

77
image:
88
repository: rancher/local-path-provisioner
9-
tag: v0.0.32
9+
tag: v0.0.33
1010
pullPolicy: IfNotPresent
1111

1212
helperImage:
@@ -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

@@ -92,12 +95,14 @@ nodePathMap:
9295
# ## OR
9396
# # See above
9497
# nodePathMap: []
95-
98+
9699
podAnnotations: {}
97100

98101
podSecurityContext: {}
99102
# runAsNonRoot: true
100103

104+
hostUsers: true
105+
101106
securityContext: {}
102107
# allowPrivilegeEscalation: false
103108
# seccompProfile:
@@ -146,8 +151,15 @@ tolerations: []
146151

147152
affinity: {}
148153

154+
# Priority class name for the pod
155+
priorityClassName: ""
156+
149157
podDisruptionBudget:
150158
enabled: false
159+
# Select either maxUnavailable or minAvailable
160+
#maxUnavailable:
161+
#minAvailable:
162+
#unhealthyPodEvictionPolicy: IfHealthyBudget
151163

152164
configmap:
153165
# specify the config map name
@@ -167,6 +179,8 @@ configmap:
167179
name: "helper-pod"
168180
annotations: {}
169181
tolerations: []
182+
# Priority class name for the helper pod (defaults to system-node-critical)
183+
priorityClassName: "system-node-critical"
170184
# Number of provisioner worker threads to call provision/delete simultaneously.
171185
# workerThreads: 4
172186

0 commit comments

Comments
 (0)