mirror of
https://github.com/gravitational/teleport
synced 2024-10-22 02:03:24 +00:00
helm: Fix antiAffinity in teleport-cluster (#6944)
The syntax for `requiredDuringSchedulingIgnoredDuringExecution` is different to that for `preferredDuringSchedulingIgnoredDuringExecution`.
This commit is contained in:
parent
776c68b8b6
commit
9d5e3e6a8e
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue