Skip to content

Commit 2f89c5a

Browse files
authored
Merge pull request #860 from andyzhangx/fix-affinity-chart
fix: incorrect affinity chart config
2 parents 6ca1d18 + 73fc9bb commit 2f89c5a

File tree

3 files changed

+4
-4
lines changed

3 files changed

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ spec:
2525
dnsPolicy: {{ .Values.controller.dnsPolicy }}
2626
serviceAccountName: {{ .Values.serviceAccount.controller }}
2727
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
28-
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
28+
{{- if tpl "{{ .Values.controller.affinity }}" . | contains "nodeSelectorTerms" }}
2929
{{- with .Values.controller.affinity }}
3030
affinity:
31-
{{ toYaml . | indent 8 }}
31+
{{ toYaml . | indent 8 }}
3232
{{- end }}
3333
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
3434
affinity:

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

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

0 commit comments

Comments
 (0)