diff --git a/templates/web-deployment.yaml b/templates/web-deployment.yaml index 56cfec9..790626a 100644 --- a/templates/web-deployment.yaml +++ b/templates/web-deployment.yaml @@ -43,6 +43,14 @@ spec: {{- range $secretName := $.Values.web.imagePullSecrets }} - name: {{ $secretName }} {{- end }} + {{- end }} + {{- if gt ($.Values.web.replicas | int) 1 }} + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: {{ include "jitsi.webShard.selectorLabels" (merge (dict "RelativeScope" .) $) | nindent 16 }} + topologyKey: kubernetes.io/hostname {{- end }} containers: - env: