From 06c4189bf9e54b1f52b121edc29090ee795c1682 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 15 Dec 2022 15:22:12 +0800 Subject: [PATCH] chore(ui): modify Affinity of UI for helm chart Change the number of the replica from 1 to 2 for helm chart Ref: 4987 Signed-off-by: James Lu --- chart/templates/deployment-ui.yaml | 12 ++++++++++++ chart/values.yaml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/chart/templates/deployment-ui.yaml b/chart/templates/deployment-ui.yaml index 06791a1..6bad5cd 100644 --- a/chart/templates/deployment-ui.yaml +++ b/chart/templates/deployment-ui.yaml @@ -15,6 +15,18 @@ spec: labels: {{- include "longhorn.labels" . | nindent 8 }} 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: {{ template "registry_url" . }}{{ .Values.image.longhorn.ui.repository }}:{{ .Values.image.longhorn.ui.tag }} diff --git a/chart/values.yaml b/chart/values.yaml index b55686c..0aa0c8f 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -203,7 +203,7 @@ longhornDriver: # label-key2: "label-value2" longhornUI: - replicas: 1 + replicas: 2 priorityClass: ~ tolerations: [] ## If you want to set tolerations for Longhorn UI Deployment, delete the `[]` in the line above