Skip to content

Commit

Permalink
feat: Enable HA by default for Modelmesh Controller (kserve#272)
Browse files Browse the repository at this point in the history
The pod anti-affinity will tell the Kubernetes schedule to schedule pods on different nodes if possible. This will allow users to enable HA by setting the number of replicas to a number greater than 1.

Signed-off-by: Anish Asthana <[email protected]>
  • Loading branch information
anishasthana authored Nov 1, 2022
1 parent 5e016de commit 55f5c18
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
selector:
matchLabels:
control-plane: modelmesh-controller
replicas: 1
replicas: 1 # This can be increased safely to enable HA. A good value to set is 3.
template:
metadata:
labels:
Expand All @@ -36,6 +36,17 @@ spec:
operator: In
values:
- amd64
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: control-plane
operator: In
values:
- modelmesh-controller
topologyKey: topology.kubernetes.io/zone
containers:
- command:
- /manager
Expand Down

0 comments on commit 55f5c18

Please sign in to comment.