INNER CODE UNIT · Go
s
NVIDIA/gpu-operator · cmd/nvidia-validator/main.go:421
s := <-stop
log.Fatalf("Exiting due to signal [%v] notification for pid [%d]", s.String(), os.Getpid())
}
func validateFlags(ctx context.Context, cli *cli.Command) (context.Context, error) {
if componentFlag == "" {
return ctx, fmt.Errorf("invalid -c <component-name> flag: must not be empty string")
}
if !isValidComponent() {
return ctx, fmt.Errorf("invalid -c <component-name> flag value: %s", componentFlag)
}
if componentFlag == "plugin" {
if nodeNameFlag == "" {
return ctx, fmt.Errorf("invalid -n <node-name> flag: must not be empty string for plugin validation")
}
if namespaceFlag == "" {
return ctx, fmt.Errorf("invalid -ns <namespace> flag: must not be empty string for plugin validation")
}