mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Ensure common envvars have higher precedence
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -105,29 +105,29 @@ func main() {
|
||||
Usage: "Path to the containerd config file",
|
||||
Value: defaultConfig,
|
||||
Destination: &options.Config,
|
||||
EnvVars: []string{"CONTAINERD_CONFIG", "RUNTIME_CONFIG"},
|
||||
EnvVars: []string{"RUNTIME_CONFIG", "CONTAINERD_CONFIG"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "socket",
|
||||
Usage: "Path to the containerd socket file",
|
||||
Value: defaultSocket,
|
||||
Destination: &options.Socket,
|
||||
EnvVars: []string{"CONTAINERD_SOCKET", "RUNTIME_SOCKET"},
|
||||
EnvVars: []string{"RUNTIME_SOCKET", "CONTAINERD_SOCKET"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "restart-mode",
|
||||
Usage: "Specify how containerd should be restarted; If 'none' is selected, it will not be restarted [signal | systemd | none]",
|
||||
Value: defaultRestartMode,
|
||||
Destination: &options.RestartMode,
|
||||
EnvVars: []string{"CONTAINERD_RESTART_MODE", "RUNTIME_RESTART_MODE"},
|
||||
EnvVars: []string{"RUNTIME_RESTART_MODE", "CONTAINERD_RESTART_MODE"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "runtime-class",
|
||||
Aliases: []string{"runtime-name", "nvidia-runtime-name"},
|
||||
Name: "runtime-name",
|
||||
Aliases: []string{"nvidia-runtime-name", "runtime-class"},
|
||||
Usage: "The name of the runtime class to set for the nvidia-container-runtime",
|
||||
Value: defaultRuntimeClass,
|
||||
Destination: &options.RuntimeName,
|
||||
EnvVars: []string{"CONTAINERD_RUNTIME_CLASS", "NVIDIA_RUNTIME_NAME"},
|
||||
EnvVars: []string{"NVIDIA_RUNTIME_NAME", "CONTAINERD_RUNTIME_CLASS"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "nvidia-runtime-dir",
|
||||
@@ -141,7 +141,7 @@ func main() {
|
||||
Usage: "Set nvidia-container-runtime as the default runtime",
|
||||
Value: defaultSetAsDefault,
|
||||
Destination: &options.SetAsDefault,
|
||||
EnvVars: []string{"CONTAINERD_SET_AS_DEFAULT", "NVIDIA_RUNTIME_SET_AS_DEFAULT"},
|
||||
EnvVars: []string{"NVIDIA_RUNTIME_SET_AS_DEFAULT", "CONTAINERD_SET_AS_DEFAULT"},
|
||||
Hidden: true,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
|
||||
Reference in New Issue
Block a user