Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support setting kubelet path for blobfuse-proxy endpoint #1325

Merged
merged 3 commits into from
Apr 8, 2024
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-v0.0.0.tgz
Binary file not shown.
2 changes: 2 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 @@ -97,6 +97,8 @@ spec:
value: "{{ .Values.node.blobfuseProxy.maxOpenFileNum }}"
- name: DISABLE_UPDATEDB
value: "{{ .Values.node.blobfuseProxy.disableUpdateDB }}"
- name: KUBELET_PATH
value: "{{ .Values.linux.kubelet }}"
volumeMounts:
- name: host-usr
mountPath: /host/usr
Expand Down
6 changes: 6 additions & 0 deletions pkg/blobfuse-proxy/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ DISABLE_UPDATEDB=${DISABLE_UPDATEDB:-true}
SET_MAX_OPEN_FILE_NUM=${SET_MAX_OPEN_FILE_NUM:-true}
SET_READ_AHEAD_SIZE=${SET_READ_AHEAD_SIZE:-true}
READ_AHEAD_KB=${READ_AHEAD_KB:-15380}
KUBELET_PATH=${KUBELET_PATH:-/var/lib/kubelet}
if [ "$KUBELET_PATH" != "/var/lib/kubelet" ];then
echo "kubelet path is $KUBELET_PATH, update blobfuse-proxy.service...."
sed -i "s#--blobfuse-proxy-endpoint[^ ]*#--blobfuse-proxy-endpoint=unix:/${KUBELET_PATH}/plugins/blob.csi.azure.com/blobfuse-proxy.sock#" /blobfuse-proxy/blobfuse-proxy.service
echo "blobfuse-proxy endpoint is updated to unix:/$KUBELET_PATH/plugins/blob.csi.azure.com/blobfuse-proxy.sock"
fi

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

Expand Down
2 changes: 1 addition & 1 deletion pkg/blobfuse-proxy/install-proxy-rhcos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ -f "/host/usr/local/bin/blobfuse-proxy" ];then
fi
if [ "$updateBlobfuseProxy" = "true" ];then
echo "copy blobfuse-proxy...."
rm -rf /host/var/lib/kubelet/plugins/blob.csi.azure.com/blobfuse-proxy.sock
rm -rf /host/"$KUBELET_PATH"/plugins/blob.csi.azure.com/blobfuse-proxy.sock
andyzhangx marked this conversation as resolved.
Show resolved Hide resolved
rm -rf /host/usr/local/bin/blobfuse-proxy
cp /blobfuse-proxy/blobfuse-proxy /host/usr/local/bin/blobfuse-proxy
chmod 755 /host/usr/local/bin/blobfuse-proxy
Expand Down
2 changes: 1 addition & 1 deletion pkg/blobfuse-proxy/install-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ if [ -f "/host/usr/bin/blobfuse-proxy" ];then
fi
if [ "$updateBlobfuseProxy" = "true" ];then
echo "copy blobfuse-proxy...."
rm -rf /host/var/lib/kubelet/plugins/blob.csi.azure.com/blobfuse-proxy.sock
rm -rf /host/"$KUBELET_PATH"/plugins/blob.csi.azure.com/blobfuse-proxy.sock
andyzhangx marked this conversation as resolved.
Show resolved Hide resolved
rm -rf /host/usr/bin/blobfuse-proxy
cp /blobfuse-proxy/blobfuse-proxy /host/usr/bin/blobfuse-proxy
chmod 755 /host/usr/bin/blobfuse-proxy
Expand Down
Loading