|
@@ -96,9 +96,10 @@ public class ProjectDomainService {
|
|
|
String podYaml = getPodYamlName(nodeName, podName); // 模板文件名称
|
|
|
String yamlPath = podYamlDirectory + podYaml;
|
|
|
String finalYaml;
|
|
|
+ String podString;
|
|
|
|
|
|
if ("1".equals(modelType)) {
|
|
|
- String podString = FileUtil.read(new File(vtdPodTemplateYaml));
|
|
|
+ podString = FileUtil.read(new File(vtdPodTemplateYaml));
|
|
|
String replace0 = podString.replace("vtd-container", "vtd-" + projectId);
|
|
|
String replace1 = replace0.replace("simulation-cloud-ip", simulationCloudIp);
|
|
|
String replace2 = replace1.replace("kafka-ip", kafkaIp);
|
|
@@ -110,7 +111,7 @@ public class ProjectDomainService {
|
|
|
String replace8 = replace7.replace("minio-secret-key", minioConfiguration.getSecretKey());
|
|
|
|
|
|
String replace9 = replace8.replace("algorithm-container", "algorithm-" + projectId);
|
|
|
- String replace10 = replace9.replace("algorithm-image", algorithmDockerImage);
|
|
|
+ String replace10 = replace9.replaceAll("algorithm-image", algorithmDockerImage);
|
|
|
|
|
|
String replace11 = replace10.replace("pod-name", podName); // pod 名称包括 projectId 和 随机字符串
|
|
|
String replace12 = replace11.replace("namespace-name", kubernetesConfiguration.getNamespace()); // pod 名称包括 projectId 和 随机字符串
|
|
@@ -134,7 +135,7 @@ public class ProjectDomainService {
|
|
|
throw new RuntimeException("createTempYaml() 是否使用 gpu:" + isChoiceGpu);
|
|
|
}
|
|
|
} else if ("2".equals(modelType)) {
|
|
|
- String podString = FileUtil.read(new File(carsimPodTemplateYaml));
|
|
|
+ podString = FileUtil.read(new File(carsimPodTemplateYaml));
|
|
|
String replace0 = podString.replace("vtd-container", "vtd-" + projectId);
|
|
|
String replace1 = replace0.replace("simulation-cloud-ip", simulationCloudIp);
|
|
|
String replace2 = replace1.replace("kafka-ip", kafkaIp);
|
|
@@ -146,7 +147,7 @@ public class ProjectDomainService {
|
|
|
String replace8 = replace7.replaceAll("minio-secret-key", minioConfiguration.getSecretKey());
|
|
|
|
|
|
String replace9 = replace8.replace("algorithm-container", "algorithm-" + projectId);
|
|
|
- String replace10 = replace9.replace("algorithm-image", algorithmDockerImage);
|
|
|
+ String replace10 = replace9.replaceAll("algorithm-image", algorithmDockerImage);
|
|
|
|
|
|
String replace11 = replace10.replace("carsim-container", "carsim-" + projectId);
|
|
|
String replace12 = replace11.replace("carsim-image", kubernetesConfiguration.getCarsimImage());
|