Skip to content

Commit 0fc1000

Browse files
authored
Merge pull request #547 from andyzhangx/blob-proxy-parameterize
feat: add env in blobfuse-proxy install script
2 parents 45ec0dd + 07ac4d5 commit 0fc1000

File tree

3 files changed

+40
-8
lines changed

3 files changed

+40
-8
lines changed
116 Bytes
Binary file not shown.

charts/latest/blob-csi-driver/templates/blobfuse-proxy.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,23 @@ spec:
4444
- '-c'
4545
- |
4646
set -xe
47-
dpkg -i /tmp/packages-microsoft-prod.deb && apt-get install -y blobfuse=1.4.1
47+
INSTALL_BLOBFUSE=${INSTALL_BLOBFUSE:-true}
48+
if (( "${INSTALL_BLOBFUSE}" == "true" ))
49+
then
50+
dpkg -i /tmp/packages-microsoft-prod.deb && apt-get install -y blobfuse=${BLOBFUSE_VERSION}
51+
fi
4852
dpkg -i /tmp/blobfuse-proxy.deb
4953
rm -f /tmp/packages-microsoft-prod.deb /tmp/blobfuse-proxy.deb
5054
mkdir -p /var/lib/kubelet/plugins/blob.csi.azure.com
51-
echo "Enabling blobfuse proxy systemctl service"
5255
systemctl enable blobfuse-proxy
5356
systemctl start blobfuse-proxy
54-
echo "set max open file num"
55-
sysctl -w fs.file-max=9000000
57+
58+
SET_MAX_FILE_NUM=${SET_MAX_OPEN_FILE_NUM:-true}
59+
if (( "${SET_MAX_OPEN_FILE_NUM}" == "true" ))
60+
then
61+
sysctl -w fs.file-max=${MAX_FILE_NUM}
62+
fi
63+
5664
echo "waiting for blobfuse-proxy service to start"
5765
sleep 3s
5866
# tail blobfuse proxy logs
@@ -63,6 +71,14 @@ spec:
6371
env:
6472
- name: "DEBIAN_FRONTEND"
6573
value: "noninteractive"
74+
- name: "INSTALL_BLOBFUSE"
75+
value: "true"
76+
- name: "BLOBFUSE_VERSION"
77+
value: "1.4.1"
78+
- name: "SET_MAX_OPEN_FILE_NUM"
79+
value: "true"
80+
- name: "MAX_FILE_NUM"
81+
value: "9000000"
6682
resources:
6783
limits:
6884
cpu: 200m

deploy/blobfuse-proxy.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,23 @@ spec:
4444
- '-c'
4545
- |
4646
set -xe
47-
dpkg -i /tmp/packages-microsoft-prod.deb && apt-get install -y blobfuse=1.4.1
47+
INSTALL_BLOBFUSE=${INSTALL_BLOBFUSE:-true}
48+
if (( "${INSTALL_BLOBFUSE}" == "true" ))
49+
then
50+
dpkg -i /tmp/packages-microsoft-prod.deb && apt-get install -y blobfuse=${BLOBFUSE_VERSION}
51+
fi
4852
dpkg -i /tmp/blobfuse-proxy.deb
4953
rm -f /tmp/packages-microsoft-prod.deb /tmp/blobfuse-proxy.deb
5054
mkdir -p /var/lib/kubelet/plugins/blob.csi.azure.com
51-
echo "Enabling blobfuse proxy systemctl service"
5255
systemctl enable blobfuse-proxy
5356
systemctl start blobfuse-proxy
54-
echo "set max open file num"
55-
sysctl -w fs.file-max=9000000
57+
58+
SET_MAX_FILE_NUM=${SET_MAX_OPEN_FILE_NUM:-true}
59+
if (( "${SET_MAX_OPEN_FILE_NUM}" == "true" ))
60+
then
61+
sysctl -w fs.file-max=${MAX_FILE_NUM}
62+
fi
63+
5664
echo "waiting for blobfuse-proxy service to start"
5765
sleep 3s
5866
# tail blobfuse proxy logs
@@ -63,6 +71,14 @@ spec:
6371
env:
6472
- name: "DEBIAN_FRONTEND"
6573
value: "noninteractive"
74+
- name: "INSTALL_BLOBFUSE"
75+
value: "true"
76+
- name: "BLOBFUSE_VERSION"
77+
value: "1.4.1"
78+
- name: "SET_MAX_OPEN_FILE_NUM"
79+
value: "true"
80+
- name: "MAX_FILE_NUM"
81+
value: "9000000"
6682
resources:
6783
limits:
6884
cpu: 200m

0 commit comments

Comments
 (0)