Skip to content

Commit

Permalink
Merge pull request #74 from vector-im/bbz/fix-haproxy-antiAffinity
Browse files Browse the repository at this point in the history
Fix HAProxy antiAffinity topologyKey to be host rather than zone and add web anti-affinity
  • Loading branch information
benbz authored Jun 29, 2023
2 parents c6c440f + 98fb82b commit b6d4a0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/haproxy-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels: {{ include "jitsi.haproxy.selectorLabels" $ | nindent 16 }}
topologyKey: topology.kubernetes.io/zone
topologyKey: kubernetes.io/hostname
{{- if $.Values.haproxy.imagePullSecrets }}
imagePullSecrets:
{{- range $secretName := $.Values.haproxy.imagePullSecrets }}
Expand Down
8 changes: 8 additions & 0 deletions templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b6d4a0d

Please sign in to comment.