Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified charts/latest/blob-csi-driver-1.26.7.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions charts/latest/blob-csi-driver/templates/csi-blob-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ spec:
- name: host-home-kubernetes-bin
mountPath: /host/home/kubernetes/bin
{{- end }}
{{- if eq .Values.linux.distro "gardenlinux" }}
{{- if or (eq .Values.linux.distro "gardenlinux") (eq .Values.linux.distro "flatcar") }}
- name: host-var-bin
mountPath: /host/var/bin
{{- end }}
Expand Down Expand Up @@ -302,7 +302,7 @@ spec:
hostPath:
path: /home/kubernetes/bin
{{- end }}
{{- if eq .Values.linux.distro "gardenlinux" }}
{{- if or (eq .Values.linux.distro "gardenlinux") (eq .Values.linux.distro "flatcar") }}
- name: host-var-bin
hostPath:
path: /var/bin
Expand Down
2 changes: 1 addition & 1 deletion pkg/blobfuse-proxy/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ echo "Linux distribution: $DISTRIBUTION, Arch: $ARCH"

# install blobfuse-proxy and blobfuse/blobfuse2 if needed
case "${DISTRIBUTION}" in
"rhcos" | "rhel" | "cos" | "gardenlinux")
"rhcos" | "rhel" | "cos" | "gardenlinux" | "flatcar")
. ./blobfuse-proxy/install-proxy-rhcos.sh
;;
*)
Expand Down
38 changes: 24 additions & 14 deletions pkg/blobfuse-proxy/install-proxy-rhcos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@

set -xe

BIN_PATH=${BIN_PATH:-/usr/local/bin}
if [ "${DISTRIBUTION}" = "cos" ]; then
echo "set BIN_PATH to /home/kubernetes/bin"
BIN_PATH="/home/kubernetes/bin"
fi
if [ "${DISTRIBUTION}" = "gardenlinux" ]; then
echo "set BIN_PATH to /var/bin"
BIN_PATH="/var/bin"
fi
if [ "${CUSTOM_BIN_PATH}" != "" ]; then
echo "set BIN_PATH to ${CUSTOM_BIN_PATH}"
BIN_PATH="${CUSTOM_BIN_PATH}"
if [ -z "${CUSTOM_BIN_PATH:-}" ] ; then
case "${DISTRIBUTION}" in
"cos")
BIN_PATH="/home/kubernetes/bin" ;;
"gardenlinux" | "flatcar")
BIN_PATH="/var/bin" ;;
*)
BIN_PATH=${BIN_PATH:-/usr/local/bin} ;;
esac
else
BIN_PATH="/${CUSTOM_BIN_PATH#/}"
fi
echo "set BIN_PATH to ${BIN_PATH}"

#copy blobfuse2 binary to BIN_PATH/blobfuse2
updateBlobfuse2="true"
Expand Down Expand Up @@ -60,6 +60,15 @@ if [ "$updateBlobfuse2" = "true" ];then
cp /usr/lib64/libfuse3.so.3* /host/usr/lib64/
fi
chmod 755 /host${BIN_PATH}/blobfuse2
if [ "$DISTRIBUTION" = "flatcar" ] ; then
find /usr/ -name 'libfuse.so.*' -exec cp '{}' /host${BIN_PATH} \;
mv /host${BIN_PATH}/blobfuse2 /host${BIN_PATH}/blobfuse2.bin
{
echo '#!/usr/bin/bash'
echo "LD_LIBRARY_PATH='${BIN_PATH}' exec ${BIN_PATH}/blobfuse2.bin \"\${@}\""
} >/host${BIN_PATH}/blobfuse2
chmod 755 /host${BIN_PATH}/blobfuse2
fi
fi

if [ "${INSTALL_BLOBFUSE_PROXY}" = "true" ];then
Expand All @@ -84,8 +93,9 @@ if [ "${INSTALL_BLOBFUSE_PROXY}" = "true" ];then
echo "change from /usr/bin/blobfuse-proxy to ${BIN_PATH}/blobfuse-proxy in blobfuse-proxy.service"
sed -i "s|/usr/bin/blobfuse-proxy|${BIN_PATH}/blobfuse-proxy|g" /blobfuse-proxy/blobfuse-proxy.service
if [ "${BIN_PATH}" != "/usr/local/bin" ]; then
echo "add Environment=\"PATH=${BIN_PATH}:$PATH\" in blobfuse-proxy.service"
sed -i "/Delegate=yes/a Environment=\"PATH=${BIN_PATH}:\$PATH\"" /blobfuse-proxy/blobfuse-proxy.service
echo "add \"PATH=${BIN_PATH}:\$PATH\" in blobfuse-proxy.service ExecStart."
sed "s,^ExecStart[[:space:]]*=\\(.*\\)\$,ExecStart=/usr/bin/bash -c \"PATH=${BIN_PATH}:\$PATH \\1\"," \
/blobfuse-proxy/blobfuse-proxy.service
fi
if [ -f "/host/etc/systemd/system/blobfuse-proxy.service" ];then
old=$(sha256sum /host/etc/systemd/system/blobfuse-proxy.service | awk '{print $1}')
Expand Down
5 changes: 5 additions & 0 deletions pkg/blobfuse-proxy/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ func getBlobfuseVersion() BlobfuseVersion {
return BlobfuseV2
}

if strings.EqualFold(osinfo.Distro, "flatcar") {
klog.V(2).Info("proxy default using blobfuse V2 for mounting on Flatcar Container Linux")
return BlobfuseV2
}

klog.V(2).Info("proxy default using blobfuse V1 for mounting")
return BlobfuseV1
}
Loading