Skip to content

Commit 905e19a

Browse files
committed
fix: controller.runOnMaster chart config
1 parent a8dbff5 commit 905e19a

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ BUILD_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
4444
endif
4545
LDFLAGS = -X ${PKG}/pkg/smb.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/smb.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/smb.buildDate=${BUILD_DATE}
4646
EXT_LDFLAGS = -s -w -extldflags "-static"
47-
E2E_HELM_OPTIONS ?= --set image.smb.repository=$(REGISTRY)/$(IMAGENAME) --set image.smb.tag=$(IMAGE_VERSION) --set controller.runOnControlPlane=true
47+
E2E_HELM_OPTIONS ?= --set image.smb.repository=$(REGISTRY)/$(IMAGENAME) --set image.smb.tag=$(IMAGE_VERSION) --set controller.runOnControlPlane=true --set controller.runOnMaster=true
4848
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
4949
# Generate all combination of all OS, ARCH, and OSVERSIONS for iteration
5050
ALL_OS = linux windows
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)