diff --git a/Makefile b/Makefile index b3a082a8a9..079346a416 100755 --- a/Makefile +++ b/Makefile @@ -30,6 +30,9 @@ BUILD_DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ") LDFLAGS ?= "-X ${PKG}/pkg/azurefile.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/azurefile.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/azurefile.buildDate=${BUILD_DATE} -s -w -extldflags '-static'" E2E_HELM_OPTIONS ?= --set image.azurefile.repository=$(REGISTRY)/$(IMAGE_NAME) --set image.azurefile.tag=$(IMAGE_VERSION) --set linux.dnsPolicy=ClusterFirstWithHostNet --set driver.userAgentSuffix="e2e-test" E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS} +ifdef KUBERNETES_VERSION # disable kubelet-registration-probe on capz cluster testing +E2E_HELM_OPTIONS += --set linux.enableRegistrationProbe=false --set windows.enableRegistrationProbe=false +endif GINKGO_FLAGS = -ginkgo.v GO111MODULE = on GOPATH ?= $(shell go env GOPATH) diff --git a/charts/README.md b/charts/README.md index 2b55932d26..39ef5d4c84 100644 --- a/charts/README.md +++ b/charts/README.md @@ -147,6 +147,7 @@ The following table lists the configurable parameters of the latest Azure File C | `linux.kubeconfig` | configure kubeconfig path on Linux agent node | '' (empty, use InClusterConfig by default) | | `linux.distro` | configure ssl certificates for different Linux distribution(available values: `debian`, `fedora`) | | `linux.mountPermissions` | mounted folder permissions | `0777` +| `linux.enableRegistrationProbe` | enable [kubelet-registration-probe](https://github.com/kubernetes-csi/node-driver-registrar#health-check-with-an-exec-probe) on Linux driver config | `true` | `linux.tolerations` | linux node driver tolerations | | `linux.affinity` | linux node pod affinity | `{}` | | `linux.nodeSelector` | linux node pod node selector | `{}` | @@ -167,6 +168,7 @@ The following table lists the configurable parameters of the latest Azure File C | `windows.dsName` | name of driver daemonset on windows |`csi-azurefile-node-win` | | `windows.kubelet` | configure kubelet directory path on Windows agent node | `'C:\var\lib\kubelet'` | | `windows.kubeconfig` | configure kubeconfig path on Windows agent node | `'C:\k\config'` | +| `windows.enableRegistrationProbe` | enable [kubelet-registration-probe](https://github.com/kubernetes-csi/node-driver-registrar#health-check-with-an-exec-probe) on windows driver config | `true` | `windows.tolerations` | windows node driver tolerations | | | `windows.affinity` | windows node pod affinity | `{}` | | `windows.nodeSelector` | windows node pod node selector | `{}` | diff --git a/charts/latest/azurefile-csi-driver-v0.0.0.tgz b/charts/latest/azurefile-csi-driver-v0.0.0.tgz index 67aca25c57..0cacd8a2ac 100644 Binary files a/charts/latest/azurefile-csi-driver-v0.0.0.tgz and b/charts/latest/azurefile-csi-driver-v0.0.0.tgz differ diff --git a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows.yaml b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows.yaml index 55ebed3954..d4f6e92f2e 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node-windows.yaml @@ -90,6 +90,7 @@ spec: - "--csi-address=$(CSI_ENDPOINT)" - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" - "--v=2" +{{- if .Values.windows.enableRegistrationProbe }} livenessProbe: exec: command: @@ -98,6 +99,7 @@ spec: - --mode=kubelet-registration-probe initialDelaySeconds: 60 timeoutSeconds: 30 +{{- end }} env: - name: CSI_ENDPOINT value: unix://C:\\csi\\csi.sock diff --git a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml index 12721aac40..cc13d66636 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml @@ -89,6 +89,7 @@ spec: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - --v=2 +{{- if .Values.linux.enableRegistrationProbe }} livenessProbe: exec: command: @@ -97,6 +98,7 @@ spec: - --mode=kubelet-registration-probe initialDelaySeconds: 30 timeoutSeconds: 15 +{{- end }} env: - name: ADDRESS value: /csi/csi.sock diff --git a/charts/latest/azurefile-csi-driver/values.yaml b/charts/latest/azurefile-csi-driver/values.yaml index b411752a0b..b1c2a17478 100644 --- a/charts/latest/azurefile-csi-driver/values.yaml +++ b/charts/latest/azurefile-csi-driver/values.yaml @@ -173,6 +173,7 @@ linux: kubeconfig: "" distro: debian # available values: debian, fedora mountPermissions: 0777 + enableRegistrationProbe: true labels: {} annotations: {} podLabels: {} @@ -214,6 +215,7 @@ windows: dsName: csi-azurefile-node-win # daemonset name kubelet: 'C:\var\lib\kubelet' kubeconfig: "" + enableRegistrationProbe: true labels: {} annotations: {} podLabels: {}