...
1
2
3
4
19
20 package subpath
21
22 import (
23 "errors"
24 "os"
25
26 "k8s.io/mount-utils"
27 "k8s.io/utils/nsenter"
28 )
29
30 type subpath struct{}
31
32 var errUnsupported = errors.New("util/subpath on this platform is not supported")
33
34
35 func New(mount.Interface) Interface {
36 return &subpath{}
37 }
38
39
40
41 func NewNSEnter(mounter mount.Interface, ne *nsenter.Nsenter, rootDir string) Interface {
42 return nil
43 }
44
45 func (sp *subpath) PrepareSafeSubpath(subPath Subpath) (newHostPath string, cleanupAction func(), err error) {
46 return subPath.Path, nil, errUnsupported
47 }
48
49 func (sp *subpath) CleanSubPaths(podDir string, volumeName string) error {
50 return errUnsupported
51 }
52
53 func (sp *subpath) SafeMakeDir(pathname string, base string, perm os.FileMode) error {
54 return errUnsupported
55 }
56
View as plain text