Update _common.tpl

Signed-off-by: laiminhtrung1997 <68812829+laiminhtrung1997@users.noreply.github.com>
This commit is contained in:
laiminhtrung1997 2023-02-21 16:59:43 +07:00 committed by GitHub
parent 99932a96c2
commit 72602d8b6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,8 +79,8 @@ Node affinity
{{- else -}} {{- else -}}
{{- $preset := .context.Values.global.affinity -}} {{- $preset := .context.Values.global.affinity -}}
podAntiAffinity: podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
{{- if (eq $preset.podAntiAffinity "soft") }} {{- if (eq $preset.podAntiAffinity "soft") }}
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
podAffinityTerm: podAffinityTerm:
labelSelector: labelSelector:
@ -88,12 +88,6 @@ podAntiAffinity:
app.kubernetes.io/name: {{ include "argo-cd.name" .context }}-{{ .component.name }} app.kubernetes.io/name: {{ include "argo-cd.name" .context }}-{{ .component.name }}
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
{{- else }} {{- else }}
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: {{ include "argo-cd.name" .context }}-{{ .component.name }}
topologyKey: topology.kubernetes.io/zone
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector: - labelSelector:
matchLabels: matchLabels: