mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
helm: add pod anti-affinity for provisioner deployments
When replication count is >1 of the provisioner, the added anti-affinity rules will prevent provisioner operators from scheduling on the same nodes. The kubernetes scheduler will spread the pods across nodes to improve availability during node failures. Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
This commit is contained in:
committed by
mergify[bot]
parent
6a5f1380b0
commit
7b940df568
@ -25,6 +25,22 @@ spec:
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
{{- if gt (int .Values.provisioner.replicaCount) 1 }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- {{ include "ceph-csi-cephfs.name" . }}
|
||||
- key: component
|
||||
operator: In
|
||||
values:
|
||||
- {{ .Values.provisioner.name }}
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }}
|
||||
containers:
|
||||
- name: csi-provisioner
|
||||
|
Reference in New Issue
Block a user