Skip to content

Commit 3f3321f

Browse files
authored
Merge pull request #2376 from kubernetes-sigs/fix-affinity-chart-1.30
[release-1.30] fix: incorrect affinity chart config
2 parents a2a2ade + 6946add commit 3f3321f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
-2 Bytes
Binary file not shown.

charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ spec:
4545
{{ toYaml . | indent 8 }}
4646
{{- end }}
4747
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
48-
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
48+
{{- if tpl "{{ .Values.controller.affinity }}" . | contains "nodeSelectorTerms" }}
4949
{{- with .Values.controller.affinity }}
5050
affinity:
51-
{{ toYaml . | indent 8 }}
51+
{{ toYaml . | indent 8 }}
5252
{{- end }}
5353
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
5454
affinity:

charts/latest/azurefile-csi-driver/templates/csi-snapshot-controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ spec:
4646
nodeSelector:
4747
kubernetes.io/os: linux
4848
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
49-
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
49+
{{- if tpl "{{ .Values.controller.affinity }}" . | contains "nodeSelectorTerms" }}
5050
{{- with .Values.controller.affinity }}
5151
affinity:
52-
{{ toYaml . | indent 8 }}
52+
{{ toYaml . | indent 8 }}
5353
{{- end }}
5454
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
5555
affinity:

0 commit comments

Comments
 (0)