Skip to content

Commit

Permalink
Add nodeSelector, affinity, and tolerations support to controller Sta…
Browse files Browse the repository at this point in the history
…tefulSet (#365)
  • Loading branch information
dominicroessner authored Feb 6, 2025
1 parent c60ef97 commit e1b061c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions helm-chart/csi-driver/templates/csi-linode-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,26 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
serviceAccount: csi-controller-sa
{{- if .Values.controller.nodeSelector }}
nodeSelector:
{{- toYaml .Values.controller.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.controller.affinity }}
affinity:
{{- toYaml .Values.controller.affinity | nindent 8 }}
{{- end }}
{{- if .Values.controller.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- else }}
tolerations:
- effect: NoSchedule
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
operator: Exists
{{- end }}
volumes:
- emptyDir: {}
name: socket-dir
Expand Down
5 changes: 5 additions & 0 deletions helm-chart/csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,8 @@ kubectl:
csiNodeDriverRegistrar:
image: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.12.0

controller:
nodeSelector: {}
affinity: {}
tolerations: []

0 comments on commit e1b061c

Please sign in to comment.