applies MIG related configuration env to container spec
(c *corev1.Container, strategy gpuv1.MIGStrategy)
| 2793 | |
| 2794 | // applies MIG related configuration env to container spec |
| 2795 | func applyMIGConfiguration(c *corev1.Container, strategy gpuv1.MIGStrategy) { |
| 2796 | // if not set then let plugin decide this per node(default: none) |
| 2797 | if strategy == "" { |
| 2798 | setContainerEnv(c, "NVIDIA_MIG_MONITOR_DEVICES", "all") |
| 2799 | return |
| 2800 | } |
| 2801 | |
| 2802 | setContainerEnv(c, "MIG_STRATEGY", string(strategy)) |
| 2803 | if strategy != gpuv1.MIGStrategyNone { |
| 2804 | setContainerEnv(c, "NVIDIA_MIG_MONITOR_DEVICES", "all") |
| 2805 | } |
| 2806 | } |
| 2807 | |
| 2808 | // checks if custom plugin config is provided through a ConfigMap |
| 2809 | func isCustomPluginConfigSet(pluginConfig *gpuv1.DevicePluginConfig) bool { |
no test coverage detected