Skip to content

Commit 10f0bbd

Browse files
Add nodeSelector, affinity, and tolerations support to controller StatefulSet
1 parent e60af6b commit 10f0bbd

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,26 @@ spec:
125125
{{- toYaml . | nindent 12 }}
126126
{{- end }}
127127
serviceAccount: csi-controller-sa
128+
{{- if .Values.controller.nodeSelector }}
129+
nodeSelector:
130+
{{- toYaml .Values.controller.nodeSelector | nindent 8 }}
131+
{{- end }}
132+
{{- if .Values.controller.affinity }}
133+
affinity:
134+
{{- toYaml .Values.controller.affinity | nindent 8 }}
135+
{{- end }}
136+
{{- if .Values.controller.tolerations }}
137+
tolerations:
138+
{{- toYaml . | nindent 8 }}
139+
{{- else }}
128140
tolerations:
129141
- effect: NoSchedule
130142
operator: Exists
131143
- key: CriticalAddonsOnly
132144
operator: Exists
133145
- effect: NoExecute
134146
operator: Exists
147+
{{- end }}
135148
volumes:
136149
- emptyDir: {}
137150
name: socket-dir

helm-chart/csi-driver/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,8 @@ kubectl:
8989
csiNodeDriverRegistrar:
9090
image: registry.k8s.io/sig-storage/csi-node-driver-registrar
9191
tag: v2.12.0
92+
93+
controller:
94+
nodeSelector: {}
95+
affinity: {}
96+
tolerations: []

0 commit comments

Comments
 (0)