Skip to content

Commit

Permalink
Merge pull request #1679 from andyzhangx/disable-install-blobfuse-v1
Browse files Browse the repository at this point in the history
fix: don't install blobfuse v1 by default since it's deprecated
  • Loading branch information
andyzhangx authored Nov 9, 2024
2 parents 604f9ca + 7defa64 commit 4f85c57
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ 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'"
ifdef ENABLE_BLOBFUSE_PROXY
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
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
else
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
endif
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
GO111MODULE = on
Expand Down
Binary file modified charts/latest/blob-csi-driver-v0.0.0.tgz
Binary file not shown.
2 changes: 2 additions & 0 deletions charts/latest/blob-csi-driver/templates/csi-blob-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ spec:
value: "{{ .Values.node.blobfuseProxy.disableUpdateDB }}"
- name: KUBELET_PATH
value: "{{ .Values.linux.kubelet }}"
- name: MIGRATE_K8S_REPO
value: "{{ .Values.node.blobfuseProxy.migrateK8sRepo }}"
volumeMounts:
- name: host-usr
mountPath: /host/usr
Expand Down
3 changes: 2 additions & 1 deletion charts/latest/blob-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,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
Expand Down
2 changes: 1 addition & 1 deletion deploy/csi-blob-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pkg/blobfuse-proxy/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
KUBELET_PATH=${KUBELET_PATH:-/var/lib/kubelet}
if [ "$KUBELET_PATH" != "/var/lib/kubelet" ];then
Expand Down
8 changes: 8 additions & 0 deletions pkg/blobfuse-proxy/install-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f85c57

Please sign in to comment.