Skip to content

Commit cbf1f07

Browse files
authored
Merge pull request #92 from andyzhangx/install-standalone-driver
feat: use standalone blobfuse driver
2 parents b3a9990 + db85106 commit cbf1f07

File tree

7 files changed

+9
-31
lines changed

7 files changed

+9
-31
lines changed

charts/latest/blobfuse-csi-driver/templates/csi-blobfuse-node.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,8 @@ spec:
9090
- mountPath: /var/lib/waagent/ManagedIdentity-Settings
9191
readOnly: true
9292
name: msi
93-
- mountPath: /usr/blob/
94-
name: blobfuse-bin
9593
- mountPath: /mnt
9694
name: blobfuse-cache
97-
- mountPath: /etc/fuse.conf
98-
name: fuse-conf
9995
volumes:
10096
- hostPath:
10197
path: /var/lib/kubelet/plugins/blobfuse.csi.azure.com
@@ -116,13 +112,6 @@ spec:
116112
- hostPath:
117113
path: /var/lib/waagent/ManagedIdentity-Settings
118114
name: msi
119-
- hostPath:
120-
path: /usr/bin
121-
name: blobfuse-bin
122115
- hostPath:
123116
path: /mnt
124-
name: blobfuse-cache
125-
- hostPath:
126-
path: /etc/fuse.conf
127-
type: FileOrCreate
128-
name: fuse-conf
117+
name: blobfuse-cache

deploy/csi-blobfuse-node.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,8 @@ spec:
8989
- mountPath: /var/lib/waagent/ManagedIdentity-Settings
9090
readOnly: true
9191
name: msi
92-
- mountPath: /usr/blob/
93-
name: blobfuse-bin
9492
- mountPath: /mnt
9593
name: blobfuse-cache
96-
- mountPath: /etc/fuse.conf
97-
name: fuse-conf
9894
volumes:
9995
- hostPath:
10096
path: /var/lib/kubelet/plugins/blobfuse.csi.azure.com
@@ -115,13 +111,6 @@ spec:
115111
- hostPath:
116112
path: /var/lib/waagent/ManagedIdentity-Settings
117113
name: msi
118-
- hostPath:
119-
path: /usr/bin
120-
name: blobfuse-bin
121114
- hostPath:
122115
path: /mnt
123-
name: blobfuse-cache
124-
- hostPath:
125-
path: /etc/fuse.conf
126-
type: FileOrCreate
127-
name: fuse-conf
116+
name: blobfuse-cache

pkg/blobfuse/nodeserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
9696
for _, opt := range mountOptions {
9797
args = args + " " + opt
9898
}
99-
cmd := exec.Command("/usr/blob/blobfuse", strings.Split(args, " ")...)
99+
cmd := exec.Command("blobfuse", strings.Split(args, " ")...)
100100
cmd.Env = append(os.Environ(), "AZURE_STORAGE_ACCOUNT="+accountName)
101101

102102
if accountSasToken != "" {

pkg/blobfuseplugin/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM ubuntu:16.04
16-
RUN apt-get update && apt-get install -y ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev
15+
FROM mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.5
16+
RUN wget -O /tmp/packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
17+
RUN dpkg -i /tmp/packages-microsoft-prod.deb && apt-get update && apt-get install -y ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev blobfuse
1718
LABEL maintainers="andyzhangx"
1819
LABEL description="Blobfuse CSI Driver"
1920

pkg/blobfuseplugin/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ func main() {
5454
os.Exit(0)
5555
}
5656
if *nodeID == "" {
57-
klog.Error("--nodeid is a required parameter")
58-
os.Exit(1)
57+
klog.Warning("nodeid is empty")
5958
}
6059

6160
exportMetrics()

test/integration/run-tests-all-clouds.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ readonly cloud="$2"
2323

2424
# copy blobfuse binary
2525
mkdir -p /usr/blob
26-
cp test/artifacts/blobfuse /usr/blob/blobfuse
26+
cp test/artifacts/blobfuse /usr/bin/blobfuse
2727

2828
apt update && apt install libfuse2 -y
2929
test/integration/run-test.sh "tcp://127.0.0.1:10000" "/tmp/testmount1" "$resource_group" "$cloud"

test/sanity/run-tests-all-clouds.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ trap cleanup EXIT
3535

3636
# copy blobfuse binary
3737
mkdir -p /usr/blob
38-
cp test/artifacts/blobfuse /usr/blob/blobfuse
38+
cp test/artifacts/blobfuse /usr/bin/blobfuse
3939

4040
install_csi_sanity_bin
4141
apt update && apt install libfuse2 -y

0 commit comments

Comments
 (0)