From 5f2af76a308002af398e68488fda17c843377844 Mon Sep 17 00:00:00 2001
From: Vitaliy Filippov <vitalif@yourcmc.ru>
Date: Tue, 27 Jul 2021 00:07:28 +0300
Subject: [PATCH] Add mount options example

---
 deploy/kubernetes/examples/storageclass.yaml | 4 +++-
 pkg/mounter/geesefs.go                       | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/deploy/kubernetes/examples/storageclass.yaml b/deploy/kubernetes/examples/storageclass.yaml
index 067a00b..7b54e6f 100644
--- a/deploy/kubernetes/examples/storageclass.yaml
+++ b/deploy/kubernetes/examples/storageclass.yaml
@@ -6,8 +6,10 @@ metadata:
 provisioner: ch.ctrox.csi.s3-driver
 parameters:
   mounter: geesefs
+  # you can set mount options here, for example limit memory cache size (recommended)
+  options: "--memory-limit 1000 --dir-mode 0777 --file-mode 0666"
   # to use an existing bucket, specify it here:
-  # bucket: some-existing-bucket
+  #bucket: some-existing-bucket
   csi.storage.k8s.io/provisioner-secret-name: csi-s3-secret
   csi.storage.k8s.io/provisioner-secret-namespace: kube-system
   csi.storage.k8s.io/controller-publish-secret-name: csi-s3-secret
diff --git a/pkg/mounter/geesefs.go b/pkg/mounter/geesefs.go
index af6ff5f..d33fcb4 100644
--- a/pkg/mounter/geesefs.go
+++ b/pkg/mounter/geesefs.go
@@ -46,7 +46,6 @@ func (geesefs *geesefsMounter) Unstage(stageTarget string) error {
 
 func (geesefs *geesefsMounter) Mount(source string, target string) error {
 	fullPath := fmt.Sprintf("%s:%s", geesefs.meta.BucketName, geesefs.meta.Prefix)
-	// FIXME Add memory limits
 	args := []string{
 		"--endpoint", geesefs.endpoint,
 		"--region", geesefs.region,