File tree Expand file tree Collapse file tree 3 files changed +23
-13
lines changed
blob-csi-driver/templates Expand file tree Collapse file tree 3 files changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,9 @@ CSI_IMAGE_TAG ?= $(REGISTRY)/$(IMAGE_NAME):$(IMAGE_VERSION)
2929CSI_IMAGE_TAG_LATEST = $(REGISTRY ) /$(IMAGE_NAME ) :latest
3030BUILD_DATE ?= $(shell date -u +"% Y-% m-% dT% H:% M:% SZ")
3131LDFLAGS ?= "-X ${PKG}/pkg/blob.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/blob.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/blob.buildDate=${BUILD_DATE} -s -w -extldflags '-static'"
32+ E2E_HELM_OPTIONS ?= --set image.blob.pullPolicy=Always --set image.blob.repository=$(REGISTRY ) /$(IMAGE_NAME ) --set image.blob.tag=$(IMAGE_VERSION ) --set driver.userAgentSuffix="e2e-test" --set node.blobfuseProxy.migrateK8sRepo=true --set controller.runOnControlPlane=true
3233ifdef ENABLE_BLOBFUSE_PROXY
33- E2E_HELM_OPTIONS ?= --set image.blob.pullPolicy=Always --set image.blob.repository=$(REGISTRY ) /$(IMAGE_NAME ) --set image.blob.tag=$(IMAGE_VERSION ) --set driver.userAgentSuffix="e2e-test" --set controller.logLevel=6 --set node.logLevel=6 --set node.enableBlobfuseProxy=true --set node.blobfuseProxy.migrateK8sRepo=true
34- else
35- E2E_HELM_OPTIONS ?= --set image.blob.pullPolicy=Always --set image.blob.repository=$(REGISTRY ) /$(IMAGE_NAME ) --set image.blob.tag=$(IMAGE_VERSION ) --set driver.userAgentSuffix="e2e-test" --set node.blobfuseProxy.migrateK8sRepo=true
34+ E2E_HELM_OPTIONS += --set node.enableBlobfuseProxy=true --set image.blob.pullPolicy=Always --set controller.logLevel=6 --set node.logLevel=6
3635endif
3736E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
3837GO111MODULE = on
Original file line number Diff line number Diff line change 2828{{ toYaml .Values.podAnnotations | indent 8 }}
2929{{- end }}
3030 spec :
31- {{- with .Values.controller.affinity }}
32- affinity :
33- {{ toYaml . | indent 8 }}
34- {{- end }}
3531 {{- if .Values.imagePullSecrets }}
3632 imagePullSecrets :
3733{{ toYaml .Values.imagePullSecrets | indent 8 }}
@@ -40,12 +36,27 @@ spec:
4036 serviceAccountName : {{ .Values.serviceAccount.controller }}
4137 nodeSelector :
4238 kubernetes.io/os : linux
43- {{- if .Values.controller.runOnMaster}}
44- node-role.kubernetes.io/master : " "
45- {{- end}}
46- {{- if .Values.controller.runOnControlPlane}}
47- node-role.kubernetes.io/control-plane : " "
48- {{- end}}
39+ # runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
40+ {{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
41+ {{- with .Values.controller.affinity }}
42+ affinity :
43+ {{ toYaml . | indent 8 }}
44+ {{- end }}
45+ {{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
46+ affinity :
47+ nodeAffinity :
48+ requiredDuringSchedulingIgnoredDuringExecution :
49+ nodeSelectorTerms :
50+ - matchExpressions :
51+ {{- if .Values.controller.runOnControlPlane}}
52+ - key : node-role.kubernetes.io/control-plane
53+ operator : Exists
54+ {{- end}}
55+ {{- if .Values.controller.runOnMaster}}
56+ - key : node-role.kubernetes.io/master
57+ operator : Exists
58+ {{- end}}
59+ {{- end }}
4960{{- with .Values.controller.nodeSelector }}
5061{{ toYaml . | indent 8 }}
5162{{- end }}
You can’t perform that action at this time.
0 commit comments