helm: Fix antiAffinity in teleport-cluster (#6944)

The syntax for `requiredDuringSchedulingIgnoredDuringExecution` is different to that for `preferredDuringSchedulingIgnoredDuringExecution`.
This commit is contained in:
Gus Luxton 2021-05-20 15:34:12 -03:00 committed by GitHub
parent 776c68b8b6
commit 9d5e3e6a8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,19 +45,26 @@ spec:
{{- else }}
podAntiAffinity:
{{- if .Values.highAvailability.requireAntiAffinity }}
requiredDuringSchedulingIgnoredDuringExecution:
{{- else if gt (int .Values.highAvailability.replicaCount) 1 }}
preferredDuringSchedulingIgnoredDuringExecution:
{{- end }}
- weight: 50
podAffinityTerm:
labelSelector:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
{{- else if gt (int .Values.highAvailability.replicaCount) 1 }}
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.tolerations }}