From 93f161cc53f102d640f63aed6b4dc0d7138a91f7 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 13 Mar 2024 15:16:57 +0200 Subject: [PATCH] Add mig-strategy flag to mps-control-daemon This change makes the handling of the MIG strategy consistent with GFD and the device plugin. This also removes the need to explicitly check for nil values when querying this value. Signed-off-by: Evan Lezar --- cmd/mps-control-daemon/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/mps-control-daemon/main.go b/cmd/mps-control-daemon/main.go index bf0db5478..46c071d43 100644 --- a/cmd/mps-control-daemon/main.go +++ b/cmd/mps-control-daemon/main.go @@ -66,6 +66,12 @@ func main() { Destination: &config.configFile, EnvVars: []string{"CONFIG_FILE"}, }, + &cli.StringFlag{ + Name: "mig-strategy", + Value: spec.MigStrategyNone, + Usage: "the desired strategy for exposing MIG devices on GPUs that support it:\n\t\t[none | single | mixed]", + EnvVars: []string{"MIG_STRATEGY"}, + }, } c.Flags = config.flags