From eb2aec9da87efa05eafc4314bdf8e378ab1f7831 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 9 Mar 2023 12:25:05 +0200 Subject: [PATCH] Allow CDI options to be set by envvars Signed-off-by: Evan Lezar --- tools/container/toolkit/toolkit.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/container/toolkit/toolkit.go b/tools/container/toolkit/toolkit.go index e1ffb716..80f81737 100644 --- a/tools/container/toolkit/toolkit.go +++ b/tools/container/toolkit/toolkit.go @@ -168,12 +168,14 @@ func main() { Usage: "the directory where the CDI output files are to be written. If this is set to '', no CDI specification is generated.", Value: "/var/run/cdi", Destination: &opts.cdiOutputDir, + EnvVars: []string{"CDI_OUTPUT_DIR"}, }, &cli.StringFlag{ Name: "cdi-kind", Usage: "the vendor string to use for the generated CDI specification", Value: "management.nvidia.com/gpu", Destination: &opts.cdiKind, + EnvVars: []string{"CDI_KIND"}, }, }