package nsenter
import "k8s.io/utils/nsenter"
Index ¶
- Constants
- type NSEnter
- func (ne *NSEnter) AbsHostPath(command string) string
- func (ne *NSEnter) Command(cmd string, args ...string) exec.Cmd
- func (ne *NSEnter) CommandContext(ctx context.Context, cmd string, args ...string) exec.Cmd
- func (ne *NSEnter) Exec(cmd string, args []string) exec.Cmd
- func (ne *NSEnter) LookPath(file string) (string, error)
- func (ne *NSEnter) SupportsSystemd() (string, bool)
- type Nsenter
Constants ¶
const ( // DefaultHostRootFsPath is path to host's filesystem mounted into container // with kubelet. DefaultHostRootFsPath = "/rootfs" )
Types ¶
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 (*NSEnter) AbsHostPath ¶
AbsHostPath returns the absolute runnable path for a specified command
func (*NSEnter) Command ¶
Command returns a command wrapped with nenter
func (*NSEnter) CommandContext ¶
CommandContext returns a CommandContext wrapped with nsenter
func (*NSEnter) Exec ¶
Exec executes nsenter commands in hostProcMountNsPath mount namespace
func (*NSEnter) LookPath ¶
LookPath returns a LookPath wrapped with nsenter
func (*NSEnter) SupportsSystemd ¶
SupportsSystemd checks whether command systemd-run exists
type Nsenter ¶
type Nsenter = NSEnter
Nsenter is a type alias for backward compatibility
func NewNsenter ¶
NewNsenter constructs a new instance of NSEnter
Source Files ¶
nsenter_unsupported.go
- Version
- v0.0.0-20250604170112-4c0f3b243397 (latest)
- Published
- Jun 4, 2025
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 1 month ago –
Tools for package owners.