File tree 3 files changed +23
-13
lines changed
blob-csi-driver/templates
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)
29
29
CSI_IMAGE_TAG_LATEST = $(REGISTRY ) /$(IMAGE_NAME ) :latest
30
30
BUILD_DATE ?= $(shell date -u +"% Y-% m-% dT% H:% M:% SZ")
31
31
LDFLAGS ?= "-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
32
33
ifdef 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
36
35
endif
37
36
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
38
37
GO111MODULE = on
Original file line number Diff line number Diff line change 28
28
{{ toYaml .Values.podAnnotations | indent 8 }}
29
29
{{- end }}
30
30
spec :
31
- {{- with .Values.controller.affinity }}
32
- affinity :
33
- {{ toYaml . | indent 8 }}
34
- {{- end }}
35
31
{{- if .Values.imagePullSecrets }}
36
32
imagePullSecrets :
37
33
{{ toYaml .Values.imagePullSecrets | indent 8 }}
@@ -40,12 +36,27 @@ spec:
40
36
serviceAccountName : {{ .Values.serviceAccount.controller }}
41
37
nodeSelector :
42
38
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 }}
49
60
{{- with .Values.controller.nodeSelector }}
50
61
{{ toYaml . | indent 8 }}
51
62
{{- end }}
You can’t perform that action at this time.
0 commit comments