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