Add rclone mounter (#15)
This commit is contained in:
parent
577f229ef7
commit
59fd15b628
9 changed files with 145 additions and 7 deletions
pkg/s3
|
@ -3,6 +3,7 @@ package s3
|
|||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kubernetes/pkg/util/mount"
|
||||
|
@ -22,6 +23,7 @@ const (
|
|||
goofysMounterType = "goofys"
|
||||
s3qlMounterType = "s3ql"
|
||||
s3backerMounterType = "s3backer"
|
||||
rcloneMounterType = "rclone"
|
||||
mounterTypeKey = "mounter"
|
||||
)
|
||||
|
||||
|
@ -45,6 +47,9 @@ func newMounter(bucket *bucket, cfg *Config) (Mounter, error) {
|
|||
case s3backerMounterType:
|
||||
return newS3backerMounter(bucket, cfg)
|
||||
|
||||
case rcloneMounterType:
|
||||
return newRcloneMounter(bucket, cfg)
|
||||
|
||||
default:
|
||||
// default to s3backer
|
||||
return newS3backerMounter(bucket, cfg)
|
||||
|
@ -59,7 +64,7 @@ func fuseMount(path string, command string, args []string) error {
|
|||
return fmt.Errorf("Error fuseMount command: %s\nargs: %s\noutput: %s", command, args, out)
|
||||
}
|
||||
|
||||
return nil
|
||||
return waitForMount(path, 10*time.Second)
|
||||
}
|
||||
|
||||
func fuseUnmount(path string, command string) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue