Skip to content

Commit

Permalink
chore: add chart file change for blobfuse2 install
Browse files Browse the repository at this point in the history
fix comments
  • Loading branch information
andyzhangx committed Mar 29, 2023
1 parent 7745036 commit 173ff0d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
6 changes: 4 additions & 2 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ The following table lists the configurable parameters of the latest Azure Blob S
| `node.logLevel` | node driver log level | `5` |
| `node.mountPermissions` | mounted folder permissions (only applies for NFS) | `0777`
| `node.enableBlobfuseProxy` | enable blobfuse-proxy on agent node | `false` |
| `node.blobfuseProxy.installBlobfuse` | whether install blobfuse on agent node| `true` |
| `node.blobfuseProxy.blobfuseVersion` | installed blobfuse version on agent node| `1.4.2` |
| `node.blobfuseProxy.installBlobfuse` | whether blobfuse should be installed on agent node| `false` |
| `node.blobfuseProxy.blobfuseVersion` | installed blobfuse version on agent node (if the value is empty, it means that the latest version should be installed.) | `` |
| `node.blobfuseProxy.installBlobfuse2` | whether blobfuse2 should be installed on agent node| `true` |
| `node.blobfuseProxy.blobfuse2Version` | installed blobfuse2 version on agent node (if the value is empty, it means that the latest version should be installed.) | ``
| `node.blobfuseProxy.setMaxOpenFileNum` | whether set max open file num on agent node| `true` |
| `node.blobfuseProxy.maxOpenFileNum` | max open file num on agent node| `9000000` |
| `node.blobfuseProxy.disableUpdateDB` | whether disable updateDB on blobfuse (saving storage account list usage) | `true` |
Expand Down
Binary file modified charts/latest/blob-csi-driver-v0.0.0.tgz
Binary file not shown.
4 changes: 4 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 @@ -80,6 +80,10 @@ spec:
value: "{{ .Values.node.blobfuseProxy.installBlobfuse }}"
- name: BLOBFUSE_VERSION
value: "{{ .Values.node.blobfuseProxy.blobfuseVersion }}"
- name: INSTALL_BLOBFUSE2
value: "{{ .Values.node.blobfuseProxy.installBlobfuse2 }}"
- name: BLOBFUSE2_VERSION
value: "{{ .Values.node.blobfuseProxy.blobfuse2Version }}"
- name: SET_MAX_OPEN_FILE_NUM
value: "{{ .Values.node.blobfuseProxy.setMaxOpenFileNum }}"
- name: MAX_FILE_NUM
Expand Down
6 changes: 4 additions & 2 deletions charts/latest/blob-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ node:
logLevel: 5
enableBlobfuseProxy: false
blobfuseProxy:
installBlobfuse: true
blobfuseVersion: 1.4.5
installBlobfuse: false
blobfuseVersion: ""
installBlobfuse2: true
blobfuse2Version: ""
setMaxOpenFileNum: true
maxOpenFileNum: "9000000"
disableUpdateDB: true
Expand Down
10 changes: 7 additions & 3 deletions deploy/csi-blob-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@ spec:
env:
- name: DEBIAN_FRONTEND
value: "noninteractive"
- name: INSTALL_BLOBFUSE
value: "true"
- name: INSTALL_BLOBFUSE_PROXY
value: "true"
- name: INSTALL_BLOBFUSE
value: "false"
- name: BLOBFUSE_VERSION
value: 1.4.5
value: ""
- name: INSTALL_BLOBFUSE2
value: "true"
- name: BLOBFUSE2_VERSION
value: ""
- name: SET_MAX_OPEN_FILE_NUM
value: "true"
- name: MAX_FILE_NUM
Expand Down
12 changes: 7 additions & 5 deletions pkg/blobfuse-proxy/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ HOST_CMD="nsenter --mount=/proc/1/ns/mnt"
if [ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ]
then
cp /blobfuse-proxy/packages-microsoft-prod.deb /host/etc/
# 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

# install/update blobfuse
Expand All @@ -36,9 +38,9 @@ then
# install blobfuse with latest version or specific version
if [ -z "${BLOBFUSE_VERSION}" ]; then
echo "install blobfuse with latest version"
yes | $HOST_CMD apt-get install -y fuse blobfuse
$HOST_CMD apt-get install -y fuse blobfuse
else
yes | $HOST_CMD apt-get install -y fuse blobfuse="${BLOBFUSE_VERSION}"
$HOST_CMD apt-get install -y fuse blobfuse="${BLOBFUSE_VERSION}"
fi
fi

Expand All @@ -48,9 +50,9 @@ then
# install blobfuse2 with latest version or specific version
if [ -z "${BLOBFUSE2_VERSION}" ]; then
echo "install blobfuse2 with latest version"
yes | $HOST_CMD apt-get install -y fuse3 blobfuse2
$HOST_CMD apt-get install -y fuse3 blobfuse2
else
yes | $HOST_CMD apt-get install -y fuse3 blobfuse2="${BLOBFUSE2_VERSION}"
$HOST_CMD apt-get install -y fuse3 blobfuse2="${BLOBFUSE2_VERSION}"
fi
fi

Expand Down Expand Up @@ -124,4 +126,4 @@ then
SUBSYSTEM=="bdi", ACTION=="add", PROGRAM="$AWK_PATH -v bdi=\$kernel 'BEGIN{ret=1} {if (\$4 == bdi){ret=0}} END{exit ret}' /proc/fs/nfsfs/volumes", ATTR{read_ahead_kb}="$READ_AHEAD_KB"
EOF
$HOST_CMD udevadm control --reload
fi
fi

0 comments on commit 173ff0d

Please sign in to comment.