Skip to content

Commit 1b670aa

Browse files
committed
fix: support gardenlinux node
1 parent aa044b7 commit 1b670aa

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

pkg/blobfuse-proxy/init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ echo "Linux distribution: $DISTRIBUTION, Arch: $ARCH"
3939

4040
# install blobfuse-proxy and blobfuse/blofuse2 if needed
4141
case "${DISTRIBUTION}" in
42-
"rhcos" | "cos")
42+
"rhcos" | "cos" | "gardenlinux")
4343
. ./blobfuse-proxy/install-proxy-rhcos.sh
4444
;;
4545
*)

pkg/blobfuse-proxy/install-proxy-rhcos.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,18 @@ set -xe
1818

1919
BIN_PATH=${BIN_PATH:-/usr/local/bin}
2020
if [ "${DISTRIBUTION}" = "cos" ]; then
21+
echo "set BIN_PATH to /home/kubernetes/bin"
2122
BIN_PATH="/home/kubernetes/bin"
2223
fi
24+
if [ "${DISTRIBUTION}" = "gardenlinux" ]; then
25+
echo "set BIN_PATH to /var/bin"
26+
BIN_PATH="/var/bin"
27+
fi
28+
if [ "${CUSTOM_BIN_PATH}" != "" ]; then
29+
echo "set BIN_PATH to ${CUSTOM_BIN_PATH}"
30+
BIN_PATH="${CUSTOM_BIN_PATH}"
31+
fi
32+
2333
#copy blobfuse2 binary to BIN_PATH/blobfuse2
2434
updateBlobfuse2="true"
2535
if [ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ]
@@ -63,6 +73,10 @@ if [ "${INSTALL_BLOBFUSE_PROXY}" = "true" ];then
6373
updateService="true"
6474
echo "change from /usr/bin/blobfuse-proxy to ${BIN_PATH}/blobfuse-proxy in blobfuse-proxy.service"
6575
sed -i "s|/usr/bin/blobfuse-proxy|${BIN_PATH}/blobfuse-proxy|g" /blobfuse-proxy/blobfuse-proxy.service
76+
if [ "${BIN_PATH}" != "/usr/local/bin" ]; then
77+
echo "add Environment=\"PATH=${BIN_PATH}:$PATH\" in blobfuse-proxy.service"
78+
sed -i "/Delegate=yes/a Environment=\"PATH=${BIN_PATH}:\$PATH\"" /blobfuse-proxy/blobfuse-proxy.service
79+
fi
6680
if [ -f "/host/etc/systemd/system/blobfuse-proxy.service" ];then
6781
old=$(sha256sum /host/etc/systemd/system/blobfuse-proxy.service | awk '{print $1}')
6882
new=$(sha256sum /blobfuse-proxy/blobfuse-proxy.service | awk '{print $1}')

0 commit comments

Comments
 (0)