Skip to content

Commit bc68bba

Browse files
authored
[improvement][helm] Update controller tolerations to use with directive for consistency (#534)
* Update controller tolerations to use `with` directive for consistency Replace `if` with `with` directive in the controller tolerations template block to match Helm best practices and maintain consistency with other conditional blocks in the template. * Update controller tolerations to remove NoSchedule toleration * Move default controller tolerations from template to values.yaml
1 parent 84f61dc commit bc68bba

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

helm-chart/csi-driver/templates/csi-linode-controller.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,9 @@ spec:
210210
affinity:
211211
{{- toYaml .Values.controller.affinity | nindent 8 }}
212212
{{- end }}
213-
{{- if .Values.controller.tolerations }}
213+
{{- with .Values.controller.tolerations }}
214214
tolerations:
215215
{{- toYaml . | nindent 8 }}
216-
{{- else }}
217-
tolerations:
218-
- effect: NoSchedule
219-
operator: Exists
220-
- key: CriticalAddonsOnly
221-
operator: Exists
222-
- effect: NoExecute
223-
operator: Exists
224216
{{- end }}
225217
volumes:
226218
- emptyDir: {}

helm-chart/csi-driver/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ controller:
109109
enabled: true
110110
nodeSelector: {}
111111
affinity: {}
112-
tolerations: []
112+
tolerations:
113+
- key: CriticalAddonsOnly
114+
operator: Exists
115+
- effect: NoExecute
116+
operator: Exists
113117

114118
daemonSet:
115119
enabled: true

0 commit comments

Comments
 (0)