Skip to content

Commit 85b3ba1

Browse files
author
Reuven Aharoni
committed
Add podAntiAffinity option to lvm-controller
1 parent 66cb3d7 commit 85b3ba1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

deploy/helm/charts/templates/lvm-controller.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ spec:
2626
{{ toYaml . | nindent 8 }}
2727
{{- end}}
2828
spec:
29+
{{- if .Values.lvmController.podAntiAffinity.enable }}
30+
affinity:
31+
podAntiAffinity:
32+
requiredDuringSchedulingIgnoredDuringExecution:
33+
- labelSelector:
34+
matchExpressions:
35+
- key: app
36+
operator: In
37+
values:
38+
- openebs-lvm-controller
39+
topologyKey: "kubernetes.io/hostname"
40+
{{- end }}
41+
2942
{{- if .Values.lvmController.priorityClass.create }}
3043
priorityClassName: {{ template "lvmlocalpv.lvmController.priorityClassName" . }}
3144
{{- end }}

deploy/helm/charts/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ lvmController:
144144
# Configure the maximum number of queries allowed after
145145
# accounting for rolled over qps from previous seconds.
146146
burst: 0
147+
podAntiAffinity:
148+
enable: false
147149

148150
# lvmPlugin is the common csi container used by the
149151
# controller deployment and node daemonset

0 commit comments

Comments
 (0)