Skip to content

Commit 775d7ec

Browse files
authored
Merge pull request #701 from andyzhangx/install-blobfuse-proxy-env
feat: add INSTALL_BLOBFUSE_PROXY env
2 parents bbb79c0 + bcc7ec5 commit 775d7ec

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

deploy/csi-blob-node.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ spec:
4848
value: "noninteractive"
4949
- name: INSTALL_BLOBFUSE
5050
value: "true"
51+
- name: INSTALL_BLOBFUSE_PROXY
52+
value: "true"
5153
- name: BLOBFUSE_VERSION
5254
value: 1.4.4
5355
- name: SET_MAX_OPEN_FILE_NUM

pkg/blobfuse-proxy/init.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@
1616

1717
set -xe
1818

19+
INSTALL_BLOBFUSE_PROXY=${INSTALL_BLOBFUSE_PROXY:-true}
1920
INSTALL_BLOBFUSE=${INSTALL_BLOBFUSE:-true}
2021
DISABLE_UPDATEDB=${DISABLE_UPDATEDB:-true}
2122
SET_MAX_OPEN_FILE_NUM=${SET_MAX_OPEN_FILE_NUM:-true}
2223

2324
HOST_CMD="nsenter --mount=/proc/1/ns/mnt"
2425

25-
cp /blobfuse-proxy/packages-microsoft-prod.deb /host/etc/
26-
2726
# install/update blobfuse
2827
if [ "${INSTALL_BLOBFUSE}" = "true" ]
2928
then
29+
cp /blobfuse-proxy/packages-microsoft-prod.deb /host/etc/
3030
$HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && \
3131
$HOST_CMD apt update && \
32-
$HOST_CMD apt-get install -y blobfuse="${BLOBFUSE_VERSION}"
32+
$HOST_CMD apt-get install -y blobfuse="${BLOBFUSE_VERSION}" && \
33+
$HOST_CMD rm -f /etc/packages-microsoft-prod.deb
3334
fi
3435

3536
if [ ! -f "/host/usr/bin/blobfuse-proxy" ];then
@@ -44,11 +45,14 @@ if [ ! -f "/host/usr/lib/systemd/system/blobfuse-proxy.service" ];then
4445
cp /blobfuse-proxy/blobfuse-proxy.service /host/usr/lib/systemd/system/blobfuse-proxy.service
4546
fi
4647

47-
$HOST_CMD systemctl daemon-reload
48-
$HOST_CMD systemctl enable blobfuse-proxy.service
49-
# According to the issue https://github.com/kubernetes-sigs/blob-csi-driver/issues/693,
50-
# do NOT RESTART blobfuse-proxy, just start it at first time.
51-
$HOST_CMD systemctl start blobfuse-proxy.service
48+
if [ "${INSTALL_BLOBFUSE_PROXY}" = "true" ]
49+
then
50+
$HOST_CMD systemctl daemon-reload
51+
$HOST_CMD systemctl enable blobfuse-proxy.service
52+
# According to the issue https://github.com/kubernetes-sigs/blob-csi-driver/issues/693,
53+
# do NOT RESTART blobfuse-proxy, just start it at first time.
54+
$HOST_CMD systemctl start blobfuse-proxy.service
55+
fi
5256

5357
if [ "${SET_MAX_OPEN_FILE_NUM}" = "true" ]
5458
then

0 commit comments

Comments
 (0)