Browse Source

开发环境可选代码配置

dev-opt-homepage
ddmte32 9 months ago
parent
commit
efe222d122
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/K8sClientUtil.java

+ 2
- 2
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/K8sClientUtil.java View File

@@ -512,8 +512,8 @@ public class K8sClientUtil {
if (StringUtils.isNotEmpty(modelPath)) {
volumeMounts.add(new V1VolumeMount().name("data").mountPath("/opt/model").subPath(modelPath).readOnly(true));
}
if (StringUtils.isNotEmpty(modelPath)) {
volumeMounts.add(new V1VolumeMount().name("data").mountPath("/opt/code").subPath(modelPath).readOnly(true));
if (StringUtils.isNotEmpty(codePath)) {
volumeMounts.add(new V1VolumeMount().name("data").mountPath("/opt/code").subPath(codePath).readOnly(true));
}
if (StringUtils.isNotEmpty(datasetPath) || StringUtils.isNotEmpty(modelPath) || StringUtils.isNotEmpty(codePath)) {
volumes.add(new V1Volume().name("data").hostPath(new V1HostPathVolumeSource().path(hostPath).type("DirectoryOrCreate")));


Loading…
Cancel
Save