Skip to content

Commit 841ddc7

Browse files
committed
Support additional taints tolerations
Signed-off-by: Dinar Valeev <[email protected]>
1 parent 24d19e2 commit 841ddc7

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

chart/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ spec:
6363
requiredDuringSchedulingIgnoredDuringExecution:
6464
nodeSelectorTerms: {{ include "linux-node-selector-terms" . | nindent 14 }}
6565
tolerations: {{ include "linux-node-tolerations" . | nindent 8 }}
66+
{{- if .Values.extraTolerations }}
67+
{{ toYaml .Values.extraTolerations | indent 8 }}
68+
{{- end }}
6669
containers:
6770
- image: {{ .Values.rancherImage }}:{{ default .Chart.AppVersion .Values.rancherImageTag }}
6871
imagePullPolicy: {{ default "IfNotPresent" .Values.rancherImagePullPolicy }}

chart/tests/deployment_test.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -545,3 +545,12 @@ tests:
545545
content:
546546
name: CATTLE_NAMESPACE
547547
value: NAMESPACE
548+
- it: sets extraTolerations
549+
set:
550+
extraTolerations:
551+
- key: "node.cloudprovider.kubernetes.io/uninitialized"
552+
value: "true"
553+
effect: "NoSchedule"
554+
asserts:
555+
- exists:
556+
path: spec.template.spec.tolerations[1]

chart/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ startupProbe:
178178
timeoutSeconds: 5
179179
periodSeconds: 10
180180
failureThreshold: 12
181+
182+
# Additional taints to tolerate
183+
extraTolerations: {}
184+
181185
livenessProbe:
182186
timeoutSeconds: 5
183187
periodSeconds: 30

0 commit comments

Comments
 (0)