diff --git a/Makefile b/Makefile index 36da33ee4c3..5fecc8fa09d 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ BUILD_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ") endif LDFLAGS = -X ${PKG}/pkg/smb.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/smb.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/smb.buildDate=${BUILD_DATE} EXT_LDFLAGS = -s -w -extldflags "-static" -E2E_HELM_OPTIONS ?= --set image.smb.repository=$(REGISTRY)/$(IMAGENAME) --set image.smb.tag=$(IMAGE_VERSION) --set controller.runOnControlPlane=true +E2E_HELM_OPTIONS ?= --set image.smb.repository=$(REGISTRY)/$(IMAGENAME) --set image.smb.tag=$(IMAGE_VERSION) --set controller.runOnControlPlane=true --set controller.runOnMaster=true E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS} # Generate all combination of all OS, ARCH, and OSVERSIONS for iteration ALL_OS = linux windows diff --git a/charts/latest/csi-driver-smb-v0.0.0.tgz b/charts/latest/csi-driver-smb-v0.0.0.tgz index 028adf6ea18..bf6bdb66891 100644 Binary files a/charts/latest/csi-driver-smb-v0.0.0.tgz and b/charts/latest/csi-driver-smb-v0.0.0.tgz differ diff --git a/charts/latest/csi-driver-smb/templates/csi-smb-controller.yaml b/charts/latest/csi-driver-smb/templates/csi-smb-controller.yaml index eb33cae9488..a29293e43d4 100755 --- a/charts/latest/csi-driver-smb/templates/csi-smb-controller.yaml +++ b/charts/latest/csi-driver-smb/templates/csi-smb-controller.yaml @@ -24,19 +24,26 @@ spec: {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} spec: + # runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set {{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }} {{- with .Values.controller.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} - {{- else if .Values.controller.runOnControlPlane}} + {{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}} affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: + {{- if .Values.controller.runOnControlPlane}} - key: node-role.kubernetes.io/control-plane operator: Exists + {{- end}} + {{- if .Values.controller.runOnMaster}} + - key: node-role.kubernetes.io/master + operator: Exists + {{- end}} {{- end }} hostNetwork: true dnsPolicy: {{ .Values.controller.dnsPolicy }} diff --git a/charts/v1.16.0/csi-driver-smb-v1.16.0.tgz b/charts/v1.16.0/csi-driver-smb-v1.16.0.tgz index e9914c4b8ef..41973ff6816 100644 Binary files a/charts/v1.16.0/csi-driver-smb-v1.16.0.tgz and b/charts/v1.16.0/csi-driver-smb-v1.16.0.tgz differ diff --git a/charts/v1.16.0/csi-driver-smb/templates/csi-smb-controller.yaml b/charts/v1.16.0/csi-driver-smb/templates/csi-smb-controller.yaml index 99bd18b6316..502a82a1a7e 100644 --- a/charts/v1.16.0/csi-driver-smb/templates/csi-smb-controller.yaml +++ b/charts/v1.16.0/csi-driver-smb/templates/csi-smb-controller.yaml @@ -24,19 +24,26 @@ spec: {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} spec: + # runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set {{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }} {{- with .Values.controller.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} - {{- else if .Values.controller.runOnControlPlane}} + {{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}} affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: + {{- if .Values.controller.runOnControlPlane}} - key: node-role.kubernetes.io/control-plane operator: Exists + {{- end}} + {{- if .Values.controller.runOnMaster}} + - key: node-role.kubernetes.io/master + operator: Exists + {{- end}} {{- end }} hostNetwork: true dnsPolicy: {{ .Values.controller.dnsPolicy }}