|
|
@@ -461,10 +461,11 @@ public class K8sClientUtil { |
|
|
int cpu = (int) valueJson.get("cpu"); |
|
|
int cpu = (int) valueJson.get("cpu"); |
|
|
String memory = (String) valueJson.get("memory"); |
|
|
String memory = (String) valueJson.get("memory"); |
|
|
memory = memory.substring(0, memory.length() - 1).concat("i"); |
|
|
memory = memory.substring(0, memory.length() - 1).concat("i"); |
|
|
|
|
|
int gpu = (int) valueJson.get("gpu"); |
|
|
|
|
|
|
|
|
HashMap<String, Quantity> limitMap = new HashMap<>(); |
|
|
HashMap<String, Quantity> limitMap = new HashMap<>(); |
|
|
if (Constant.Computing_Resource_GPU.equals(devEnvironment.getComputingResource())) { |
|
|
if (Constant.Computing_Resource_GPU.equals(devEnvironment.getComputingResource())) { |
|
|
limitMap.put("nvidia.com/gpu", new Quantity("1")); |
|
|
|
|
|
|
|
|
limitMap.put("nvidia.com/gpu", new Quantity(String.valueOf(gpu))); |
|
|
} |
|
|
} |
|
|
limitMap.put("cpu", new Quantity(String.valueOf(cpu))); |
|
|
limitMap.put("cpu", new Quantity(String.valueOf(cpu))); |
|
|
limitMap.put("memory", new Quantity(memory)); |
|
|
limitMap.put("memory", new Quantity(memory)); |
|
|
|