package nsenter
import "k8s.io/kubernetes/pkg/util/nsenter"
Index ¶
- Constants
- type Executor
- func NewNsenterExecutor(hostRootFsPath string, executor exec.Interface) *Executor
- func (nsExecutor *Executor) Command(cmd string, args ...string) exec.Cmd
- func (nsExecutor *Executor) CommandContext(ctx context.Context, cmd string, args ...string) exec.Cmd
- func (nsExecutor *Executor) LookPath(file string) (string, error)
- type Nsenter
Constants ¶
const ( // DefaultHostRootFsPath is path to host's filesystem mounted into container // with kubelet. DefaultHostRootFsPath = "/rootfs" )
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor wraps executor interface to be executed via nsenter
func NewNsenterExecutor ¶
NewNsenterExecutor returns new nsenter based executor
func (*Executor) Command ¶
Command returns a command wrapped with nenter
func (*Executor) CommandContext ¶
func (nsExecutor *Executor) CommandContext(ctx context.Context, cmd string, args ...string) exec.Cmd
CommandContext returns a CommandContext wrapped with nsenter
func (*Executor) LookPath ¶
LookPath returns a LookPath wrapped with nsenter
type Nsenter ¶
type Nsenter struct { // a map of commands to their paths on the host filesystem Paths map[string]string }
Nsenter is part of experimental support for running the kubelet in a container.
func NewNsenter ¶
NewNsenter constructs a new instance of Nsenter
func (*Nsenter) AbsHostPath ¶
AbsHostPath returns the absolute runnable path for a specified command
func (*Nsenter) Exec ¶
Exec executes nsenter commands in hostProcMountNsPath mount namespace
func (*Nsenter) SupportsSystemd ¶
SupportsSystemd checks whether command systemd-run exists
Source Files ¶
exec_unsupported.go nsenter_unsupported.go
- Version
- v1.13.9
- Published
- Aug 1, 2019
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 1 minute ago –
Tools for package owners.