mirror of https://github.com/k3s-io/k3s
Add user path to runtimes search
Signed-off-by: Vitor Savian <vitor.savian@suse.com>pull/11021/head
parent
9de27e958a
commit
9624098a4e
|
@ -24,7 +24,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
socketPrefix = "unix://"
|
socketPrefix = "unix://"
|
||||||
runtimesPath = "/usr/local/nvidia/toolkit:/opt/kwasm/bin:/usr/sbin:/usr/local/sbin:/usr/bin:/usr/local/bin"
|
runtimesPath = "/usr/local/nvidia/toolkit:/opt/kwasm/bin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getContainerdArgs(cfg *config.Node) []string {
|
func getContainerdArgs(cfg *config.Node) []string {
|
||||||
|
@ -55,10 +55,10 @@ func SetupContainerdConfig(cfg *config.Node) error {
|
||||||
cfg.AgentConfig.Systemd = !isRunningInUserNS && controllers["cpuset"] && os.Getenv("INVOCATION_ID") != ""
|
cfg.AgentConfig.Systemd = !isRunningInUserNS && controllers["cpuset"] && os.Getenv("INVOCATION_ID") != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the path to include the runtimes and then remove the aditional path entries
|
// set the path to include the default runtimes and remove the aditional path entries
|
||||||
// that we added after finding the runtimes
|
// that we added after finding the runtimes
|
||||||
originalPath := os.Getenv("PATH")
|
originalPath := os.Getenv("PATH")
|
||||||
os.Setenv("PATH", runtimesPath)
|
os.Setenv("PATH", runtimesPath+string(os.PathListSeparator)+originalPath)
|
||||||
extraRuntimes := findContainerRuntimes()
|
extraRuntimes := findContainerRuntimes()
|
||||||
os.Setenv("PATH", originalPath)
|
os.Setenv("PATH", originalPath)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue