Skip to content

Commit d13ea1e

Browse files
authored
Merge pull request #886 from andyzhangx/fix-runOnMaster2
fix: controller.runOnMaster chart config
2 parents a8dbff5 + 6d66b3c commit d13ea1e

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed
68 Bytes
Binary file not shown.

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,26 @@ spec:
2424
{{ toYaml .Values.podAnnotations | indent 8 }}
2525
{{- end }}
2626
spec:
27+
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
2728
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
2829
{{- with .Values.controller.affinity }}
2930
affinity:
3031
{{ toYaml . | indent 8 }}
3132
{{- end }}
32-
{{- else if .Values.controller.runOnControlPlane}}
33+
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
3334
affinity:
3435
nodeAffinity:
3536
requiredDuringSchedulingIgnoredDuringExecution:
3637
nodeSelectorTerms:
3738
- matchExpressions:
39+
{{- if .Values.controller.runOnControlPlane}}
3840
- key: node-role.kubernetes.io/control-plane
3941
operator: Exists
42+
{{- end}}
43+
{{- if .Values.controller.runOnMaster}}
44+
- key: node-role.kubernetes.io/master
45+
operator: Exists
46+
{{- end}}
4047
{{- end }}
4148
hostNetwork: true
4249
dnsPolicy: {{ .Values.controller.dnsPolicy }}
69 Bytes
Binary file not shown.

charts/v1.16.0/csi-driver-smb/templates/csi-smb-controller.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,26 @@ spec:
2424
{{ toYaml .Values.podAnnotations | indent 8 }}
2525
{{- end }}
2626
spec:
27+
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
2728
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
2829
{{- with .Values.controller.affinity }}
2930
affinity:
3031
{{ toYaml . | indent 8 }}
3132
{{- end }}
32-
{{- else if .Values.controller.runOnControlPlane}}
33+
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
3334
affinity:
3435
nodeAffinity:
3536
requiredDuringSchedulingIgnoredDuringExecution:
3637
nodeSelectorTerms:
3738
- matchExpressions:
39+
{{- if .Values.controller.runOnControlPlane}}
3840
- key: node-role.kubernetes.io/control-plane
3941
operator: Exists
42+
{{- end}}
43+
{{- if .Values.controller.runOnMaster}}
44+
- key: node-role.kubernetes.io/master
45+
operator: Exists
46+
{{- end}}
4047
{{- end }}
4148
hostNetwork: true
4249
dnsPolicy: {{ .Values.controller.dnsPolicy }}

0 commit comments

Comments
 (0)