|
@@ -95,6 +95,7 @@ public class ProjectDomainService {
|
|
|
String podName = getRandomPodName(projectId); // 生成 podName
|
|
|
String podYaml = getPodYamlName(nodeName, podName); // 模板文件名称
|
|
|
String yamlPath = podYamlDirectory + podYaml;
|
|
|
+ String yamlPathBak = podYamlDirectory + "bak/" + podYaml;
|
|
|
String finalYaml;
|
|
|
String podString;
|
|
|
|
|
@@ -183,6 +184,7 @@ public class ProjectDomainService {
|
|
|
}
|
|
|
log.info("保存项目 " + projectId + " 的 yaml 文件:" + yamlPath);
|
|
|
FileUtil.writeStringToLocalFile(finalYaml, yamlPath);
|
|
|
+ FileUtil.writeStringToLocalFile(finalYaml, yamlPathBak); // v20240409 备份一份yaml方便定位问题
|
|
|
// 保存 yaml 地址
|
|
|
String yamlRedisKey = "project:" + projectId + ":node:" + nodeName + ":yaml:" + podName;
|
|
|
stringRedisTemplate.opsForValue().set(yamlRedisKey, yamlPath);
|