Merge pull request #862 from andyzhangx/fix-affinity-chart-4.10.0

fix: incorrect affinity chart config in v4.10.0 chart
This commit is contained in:
Andy Zhang 2025-02-11 19:52:59 +08:00 committed by GitHub
commit 3619e1bb1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -25,10 +25,10 @@ spec:
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: {{ .Values.serviceAccount.controller }}
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
{{- if tpl "{{ .Values.controller.affinity }}" . | contains "nodeSelectorTerms" }}
{{- with .Values.controller.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
affinity:

View File

@ -47,10 +47,10 @@ spec:
nodeSelector:
kubernetes.io/os: linux
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
{{- if tpl "{{ .Values.controller.affinity }}" . | contains "nodeSelectorTerms" }}
{{- with .Values.controller.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
affinity: