From 5fa7579794cdaeee62321a96273c30115430bd8a Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 15 Dec 2022 15:14:08 +0800 Subject: [PATCH] chore(ui): modify Affinity of UI in deploy.yaml Change the number of the replica from 1 to 2. Ref: 4987 Signed-off-by: James Lu --- deploy/longhorn.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index 10de975..23073a6 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -4091,7 +4091,7 @@ metadata: name: longhorn-ui namespace: longhorn-system spec: - replicas: 1 + replicas: 2 selector: matchLabels: app: longhorn-ui @@ -4103,6 +4103,18 @@ spec: app.kubernetes.io/version: v1.4.0-dev app: longhorn-ui spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - longhorn-ui + topologyKey: kubernetes.io/hostname containers: - name: longhorn-ui image: longhornio/longhorn-ui:master-head