diff --git a/README.md b/README.md index 68c7c7ccf5b0552a24617fe2509e71981c58c49d..606b549f8953eb7565f6ee0d054a6d2e5cd8a13b 100644 --- a/README.md +++ b/README.md @@ -171,12 +171,19 @@ data: metadata: name: helper-pod spec: + priorityClassName: system-node-critical + tolerations: + - key: node.kubernetes.io/disk-pressure + operator: Exists + effect: NoSchedule containers: - name: helper-pod image: busybox ``` +The helperPod is allowed to run on nodes experiencing disk pressure conditions, despite the potential resource constraints. When it runs on such a node, it can carry out specific cleanup tasks, freeing up space in PVCs, and resolving the disk-pressure issue. + #### `config.json` ##### Definition @@ -235,7 +242,7 @@ If the reload fails, the provisioner will log the error and **continue using the To specify the type of volume you want the provisioner to create, add either of the following annotations; -- PVC: +- PVC: ```yaml annotations: volumeType: <local or hostPath> diff --git a/deploy/chart/local-path-provisioner/templates/configmap.yaml b/deploy/chart/local-path-provisioner/templates/configmap.yaml index c9532a7dd4abe876b9c138015a88f0133c07f2be..6ad117b6aef9ccbe1d594ddcdcb77fb52d08cde9 100644 --- a/deploy/chart/local-path-provisioner/templates/configmap.yaml +++ b/deploy/chart/local-path-provisioner/templates/configmap.yaml @@ -16,15 +16,20 @@ data: {{- end }} {{- $config | toPrettyJson | nindent 4 }} setup: |- - {{ .Values.configmap.setup | nindent 4 }} + {{- .Values.configmap.setup | nindent 4 }} teardown: |- - {{ .Values.configmap.teardown | nindent 4 }} + {{- .Values.configmap.teardown | nindent 4 }} helperPod.yaml: |- apiVersion: v1 kind: Pod metadata: name: helper-pod spec: + priorityClassName: system-node-critical + tolerations: + - key: node.kubernetes.io/disk-pressure + operator: Exists + effect: NoSchedule containers: - name: helper-pod {{- if .Values.privateRegistry.registryUrl }} diff --git a/deploy/example-config.yaml b/deploy/example-config.yaml index bf3617884a5e931ae18a52eafc9dd8409337a08c..795f9df9168845001412fb67df1548ed3917bfd6 100644 --- a/deploy/example-config.yaml +++ b/deploy/example-config.yaml @@ -35,9 +35,12 @@ data: metadata: name: helper-pod spec: + priorityClassName: system-node-critical + tolerations: + - key: node.kubernetes.io/disk-pressure + operator: Exists + effect: NoSchedule containers: - name: helper-pod image: busybox imagePullPolicy: IfNotPresent - - diff --git a/deploy/local-path-storage.yaml b/deploy/local-path-storage.yaml index 2b6b68eedde902de913b368724cf557847d96375..ec5482bbe4dcb66dd437ed1107e7ec069deb9eb8 100644 --- a/deploy/local-path-storage.yaml +++ b/deploy/local-path-storage.yaml @@ -148,9 +148,12 @@ data: metadata: name: helper-pod spec: + priorityClassName: system-node-critical + tolerations: + - key: node.kubernetes.io/disk-pressure + operator: Exists + effect: NoSchedule containers: - name: helper-pod image: busybox imagePullPolicy: IfNotPresent - -