Mounter can now only be specified through flag

This commit is contained in:
Cyrill Troxler 2018-07-21 15:23:11 +02:00
parent 9d5d84ebfb
commit 8cd8f6b6cd
11 changed files with 53 additions and 25 deletions

View file

@ -4,6 +4,8 @@ import (
"fmt"
"os"
"os/exec"
"k8s.io/kubernetes/pkg/util/mount"
)
// Implements Mounter
@ -49,6 +51,10 @@ func (s3fs *s3fsMounter) Mount(targetPath string) error {
return nil
}
func (s3fs *s3fsMounter) Unmount(targetPath string) error {
return mount.New("").Unmount(targetPath)
}
func writes3fsPass(pwFileContent string) error {
pwFileName := fmt.Sprintf("%s/.passwd-s3fs", os.Getenv("HOME"))
pwFile, err := os.OpenFile(pwFileName, os.O_RDWR|os.O_CREATE, 0600)