Skip to content

Commit 8d38502

Browse files
authored
Merge pull request #500 from andyzhangx/runOnControlPlane
feat: add runOnControlPlane in chart config
2 parents 0e94a80 + f3f11e2 commit 8d38502

File tree

6 files changed

+8
-3
lines changed

6 files changed

+8
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ IMAGE_TAG_LATEST = $(REGISTRY)/$(IMAGENAME):latest
4040
BUILD_DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
4141
LDFLAGS = -X ${PKG}/pkg/smb.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/smb.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/smb.buildDate=${BUILD_DATE}
4242
EXT_LDFLAGS = -s -w -extldflags "-static"
43-
E2E_HELM_OPTIONS ?= --set image.smb.repository=$(REGISTRY)/$(IMAGENAME) --set image.smb.tag=$(IMAGE_VERSION) --set controller.dnsPolicy=ClusterFirstWithHostNet --set linux.dnsPolicy=ClusterFirstWithHostNet --set controller.runOnMaster=true
43+
E2E_HELM_OPTIONS ?= --set image.smb.repository=$(REGISTRY)/$(IMAGENAME) --set image.smb.tag=$(IMAGE_VERSION) --set controller.dnsPolicy=ClusterFirstWithHostNet --set linux.dnsPolicy=ClusterFirstWithHostNet
4444
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
4545
# Generate all combination of all OS, ARCH, and OSVERSIONS for iteration
4646
ALL_OS = linux windows

charts/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- [install Helm](https://helm.sh/docs/intro/quickstart/#install-helm)
55

66
### Tips
7-
- make controller only run on master node: `--set controller.runOnMaster=true`
7+
- run controller on control plane node: `--set controller.runOnControlPlane=true`
88

99
### install a specific version
1010
```console
@@ -66,6 +66,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
6666
| `controller.logLevel` | controller driver log level |`5` |
6767
| `controller.workingMountDir` | working directory for provisioner to mount smb shares temporarily | `/tmp` |
6868
| `controller.runOnMaster` | run controller on master node | `false` |
69+
| `controller.runOnControlPlane` | run controller on control plane node |`false` |
6970
| `controller.resources.csiProvisioner.limits.memory` | csi-provisioner memory limits | `100Mi` |
7071
| `controller.resources.csiProvisioner.requests.cpu` | csi-provisioner cpu requests limits | `10m` |
7172
| `controller.resources.csiProvisioner.requests.memory` | csi-provisioner memory requests limits | `20Mi` |
21 Bytes
Binary file not shown.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ spec:
3636
{{- if .Values.controller.runOnMaster}}
3737
node-role.kubernetes.io/master: ""
3838
{{- end}}
39+
{{- if .Values.controller.runOnControlPlane}}
40+
node-role.kubernetes.io/control-plane: ""
41+
{{- end}}
3942
priorityClassName: system-cluster-critical
4043
{{- with .Values.controller.tolerations }}
4144
tolerations:

charts/latest/csi-driver-smb/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ controller:
4040
livenessProbe:
4141
healthPort: 29642
4242
runOnMaster: false
43+
runOnControlPlane: false
4344
logLevel: 5
4445
workingMountDir: "/tmp"
4546
resources:

test/external-e2e/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ setup_e2e_binaries() {
3030
tar -xvf e2e-tests.tar.gz && rm e2e-tests.tar.gz
3131

3232
# test on alternative driver name
33-
export EXTRA_HELM_OPTIONS=" --set driver.name=$DRIVER.csi.k8s.io --set controller.name=csi-$DRIVER-controller --set linux.dsName=csi-$DRIVER-node --set windows.dsName=csi-$DRIVER-node-win --set controller.runOnMaster=true"
33+
export EXTRA_HELM_OPTIONS=" --set driver.name=$DRIVER.csi.k8s.io --set controller.name=csi-$DRIVER-controller --set linux.dsName=csi-$DRIVER-node --set windows.dsName=csi-$DRIVER-node-win"
3434
sed -i "s/smb.csi.k8s.io/$DRIVER.csi.k8s.io/g" deploy/example/storageclass-smb.yaml
3535
sed -i "s/gid=/uid=/g" deploy/example/storageclass-smb.yaml
3636
make install-smb-provisioner

0 commit comments

Comments
 (0)