Skip to content

Commit

Permalink
Merge pull request #1325 from cvvz/fix-1236
Browse files Browse the repository at this point in the history
feat: support setting kubelet path for blobfuse-proxy endpoint
  • Loading branch information
k8s-ci-robot authored Apr 8, 2024
2 parents 4effa8e + e9182e5 commit 164ff7a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
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
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
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

0 comments on commit 164ff7a

Please sign in to comment.