Skip to content

Commit 6e7eda8

Browse files
committed
fix: Add tolerations to syncer job
1 parent 1f99da8 commit 6e7eda8

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

charts/cloudstack-csi/templates/syncer-job.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ spec:
1818
spec:
1919
securityContext: {{- toYaml .Values.syncer.podSecurityContext | nindent 8 }}
2020
serviceAccountName: {{ .Values.syncer.serviceAccount.name }}
21+
tolerations:
22+
{ { - with .Values.node.tolerations } }
23+
{ { - toYaml . | nindent 8 } }
24+
{ { - end } }
25+
{{- with .Values.syncer.affinity }}
26+
affinity: {{- toYaml . | nindent 8 }}
27+
{{- end }}
28+
nodeSelector:
29+
kubernetes.io/os: linux
30+
{{- with .Values.syncer.nodeSelector }}
31+
{{- toYaml . | nindent 8 }}
32+
{{- end }}
2133
containers:
2234
- image: "{{ .Values.syncer.image.repository }}:{{ .Values.syncer.image.tag | default .Chart.AppVersion }}"
2335
imagePullPolicy: {{ .Values.syncer.image.imagePullPolicy }}
@@ -55,13 +67,5 @@ spec:
5567
hostPath:
5668
path: /etc/cloudstack-csi-driver
5769
{{- end }}
58-
{{- with .Values.syncer.affinity }}
59-
affinity: {{- toYaml . | nindent 8 }}
60-
{{- end }}
61-
nodeSelector:
62-
kubernetes.io/os: linux
63-
{{- with .Values.syncer.nodeSelector }}
64-
{{- toYaml . | nindent 8 }}
65-
{{- end }}
6670
restartPolicy: {{ .Values.syncer.restartPolicy }}
6771
{{- end }}

charts/cloudstack-csi/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ controller:
139139
# Overrides the image tag whose default is v{{ .Chart.AppVersion }}
140140
tag: ""
141141
pullPolicy: IfNotPresent
142-
## Set number of replicas (If replicaCount set to 1 by default leader-elect will be false)
143142
replicaCount: 2
144143
# Extra arguments passed to cloudstack-csi-driver controller.
145144
extraArgs: []
@@ -335,6 +334,13 @@ syncer:
335334
nodeSelector: {}
336335
podAnnotations: {}
337336
podLabels: {}
337+
tolerations:
338+
- key: node-role.kubernetes.io/control-plane
339+
operator: Exists
340+
effect: NoSchedule
341+
- key: node.kubernetes.io/not-ready
342+
operator: Exists
343+
effect: NoSchedule
338344
resources: {}
339345
serviceAccount:
340346
create: true

0 commit comments

Comments
 (0)