mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Add Exec interface to VolumeHost
This exec should be used by volume plugins to execute mount utilities. It will eventually execute things in mount containers.
This commit is contained in:
@@ -70,6 +70,16 @@ type Interface interface {
|
||||
GetDeviceNameFromMount(mountPath, pluginDir string) (string, error)
|
||||
}
|
||||
|
||||
// Exec executes command where mount utilities are. This can be either the host,
|
||||
// container where kubelet runs or even a remote pod with mount utilities.
|
||||
// Usual pkg/util/exec interface is not used because kubelet.RunInContainer does
|
||||
// not provide stdin/stdout/stderr streams.
|
||||
type Exec interface {
|
||||
// Run executes a command and returns its stdout + stderr combined in one
|
||||
// stream.
|
||||
Run(cmd string, args ...string) ([]byte, error)
|
||||
}
|
||||
|
||||
// Compile-time check to ensure all Mounter implementations satisfy
|
||||
// the mount interface
|
||||
var _ Interface = &Mounter{}
|
||||
|
||||
Reference in New Issue
Block a user