diff --git a/Makefile b/Makefile index 4fd2b34f9..8b3fa57da 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ CSI_IMAGE_TAG ?= $(REGISTRY)/$(IMAGE_NAME):$(IMAGE_VERSION) CSI_IMAGE_TAG_LATEST = $(REGISTRY)/$(IMAGE_NAME):latest BUILD_DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ") 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'" -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" +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 ifdef ENABLE_BLOBFUSE_PROXY override E2E_HELM_OPTIONS := $(E2E_HELM_OPTIONS) --set controller.logLevel=6 --set node.logLevel=6 --set node.enableBlobfuseProxy=true endif diff --git a/charts/latest/blob-csi-driver-v1.23.9.tgz b/charts/latest/blob-csi-driver-v1.23.9.tgz index 5232bd473..025e41fcc 100644 Binary files a/charts/latest/blob-csi-driver-v1.23.9.tgz and b/charts/latest/blob-csi-driver-v1.23.9.tgz differ diff --git a/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml b/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml index aad8ecee4..79deb9abe 100644 --- a/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml +++ b/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml @@ -100,6 +100,8 @@ spec: value: "{{ .Values.node.blobfuseProxy.maxOpenFileNum }}" - name: DISABLE_UPDATEDB value: "{{ .Values.node.blobfuseProxy.disableUpdateDB }}" + - name: MIGRATE_K8S_REPO + value: "{{ .Values.node.blobfuseProxy.migrateK8sRepo }}" volumeMounts: - name: host-usr mountPath: /host/usr diff --git a/charts/latest/blob-csi-driver/values.yaml b/charts/latest/blob-csi-driver/values.yaml index 669823f65..ac7ba1e5c 100644 --- a/charts/latest/blob-csi-driver/values.yaml +++ b/charts/latest/blob-csi-driver/values.yaml @@ -119,13 +119,14 @@ node: logLevel: 5 enableBlobfuseProxy: true blobfuseProxy: - installBlobfuse: true + installBlobfuse: false blobfuseVersion: "1.4.5" installBlobfuse2: true blobfuse2Version: "2.3.2" setMaxOpenFileNum: true maxOpenFileNum: "9000000" disableUpdateDB: true + migrateK8sRepo: false blobfuseCachePath: /mnt appendTimeStampInCacheDir: false mountPermissions: 0777 diff --git a/deploy/csi-blob-node.yaml b/deploy/csi-blob-node.yaml index 35955b0bb..d33039293 100644 --- a/deploy/csi-blob-node.yaml +++ b/deploy/csi-blob-node.yaml @@ -55,7 +55,7 @@ spec: - name: INSTALL_BLOBFUSE_PROXY value: "true" - name: INSTALL_BLOBFUSE - value: "true" + value: "false" - name: BLOBFUSE_VERSION value: "1.4.5" - name: INSTALL_BLOBFUSE2 diff --git a/pkg/blobfuse-proxy/init.sh b/pkg/blobfuse-proxy/init.sh index 31fa8d7e5..6082451d7 100755 --- a/pkg/blobfuse-proxy/init.sh +++ b/pkg/blobfuse-proxy/init.sh @@ -20,6 +20,7 @@ INSTALL_BLOBFUSE_PROXY=${INSTALL_BLOBFUSE_PROXY:-true} DISABLE_UPDATEDB=${DISABLE_UPDATEDB:-true} SET_MAX_OPEN_FILE_NUM=${SET_MAX_OPEN_FILE_NUM:-true} SET_READ_AHEAD_SIZE=${SET_READ_AHEAD_SIZE:-true} +MIGRATE_K8S_REPO=${MIGRATE_K8S_REPO:-false} READ_AHEAD_KB=${READ_AHEAD_KB:-15380} HOST_CMD="nsenter --mount=/proc/1/ns/mnt" diff --git a/pkg/blobfuse-proxy/install-proxy.sh b/pkg/blobfuse-proxy/install-proxy.sh index ad660eca5..c4a497157 100644 --- a/pkg/blobfuse-proxy/install-proxy.sh +++ b/pkg/blobfuse-proxy/install-proxy.sh @@ -33,6 +33,14 @@ then else cp /blobfuse-proxy/packages-microsoft-prod-22.04.deb /host/etc/packages-microsoft-prod.deb fi + + if [ "${MIGRATE_K8S_REPO}" = "true" ] + then + # https://kubernetes.io/blog/2023/08/15/pkgs-k8s-io-introduction/#how-to-migrate + echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /" | tee /host/etc/apt/sources.list.d/kubernetes.list + $HOST_CMD curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | $HOST_CMD gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg + fi + # when running dpkg -i /etc/packages-microsoft-prod.deb, need to enter y to continue. # refer to https://stackoverflow.com/questions/45349571/how-to-install-deb-with-dpkg-non-interactively yes | $HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && $HOST_CMD apt update diff --git a/test/e2e/testsuites/dynamically_provisioned_restart_driver_tester.go b/test/e2e/testsuites/dynamically_provisioned_restart_driver_tester.go index 9f6566637..8ba86ac82 100644 --- a/test/e2e/testsuites/dynamically_provisioned_restart_driver_tester.go +++ b/test/e2e/testsuites/dynamically_provisioned_restart_driver_tester.go @@ -82,12 +82,6 @@ func (t *DynamicallyProvisionedRestartDriverTest) Run(ctx context.Context, clien if useBlobfuseProxy { t.StorageClassParameters["skuName"] = "Standard_LRS" - ginkgo.By("run for blobfuse") - t.StorageClassParameters["protocol"] = "fuse" - wg.Add(1) - wgPodReady.Add(1) - go run() - ginkgo.By("run for blobfuse2") t.StorageClassParameters["protocol"] = "fuse2" wg.Add(1)