feat(HA): adding antiaffinity in the controller deployment

so that no two pods get scheduled on the same node. Also keeping
the default replica to 1, if HA feature is required, we can change
replica count to 2(or more).

Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
Pawan 2020-01-06 12:48:02 +05:30 committed by Kiran Mova
parent 4689c21cb4
commit 7094c48a8f
2 changed files with 31 additions and 1 deletions

View file

@ -115,13 +115,23 @@ spec:
app: openebs-zfs-controller
role: openebs-zfs
serviceName: "openebs-zfs"
replicas: 2
replicas: 1
template:
metadata:
labels:
app: openebs-zfs-controller
role: openebs-zfs
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- openebs-zfs-controller
topologyKey: "kubernetes.io/hostname"
priorityClassName: system-cluster-critical
serviceAccount: openebs-zfs-controller-sa
containers: