Browse Source

修改tensorboard挂载路径

dev-restore_mount
chenzhihang 1 year ago
parent
commit
ad0d0c9a1b
2 changed files with 3 additions and 12 deletions
  1. +3
    -3
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/K8sClientUtil.java
  2. +0
    -9
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/FrameLogPathVo.java

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

@@ -315,9 +315,9 @@ public class K8sClientUtil {
* @return 创建成功的pod,的nodePort端口
*/

public Integer createPodWithSubPath(String podName, String namespace, Integer port, String mountPath, String subPath, String pvcName, String image) {
public Integer createPodWithSubPath(String podName, String namespace, Integer port, String mountPath, String subPath, String image) {

Map<String, String> selector = new LinkedHashMap<String, String>();
Map<String, String> selector = new LinkedHashMap<>();
selector.put("k8s-jupyter", podName);

CoreV1Api api = new CoreV1Api(apiClient);
@@ -366,7 +366,7 @@ public class K8sClientUtil {
.endContainer()
.addNewVolume()
.withName("workspace")
.withHostPath(new V1HostPathVolumeSource().path(pvcName).type("DirectoryOrCreate"))
.withHostPath(new V1HostPathVolumeSource().path(hostPath).type("DirectoryOrCreate"))
// .withPersistentVolumeClaim(new V1PersistentVolumeClaimVolumeSource().claimName(pvcName))
.endVolume()
.withTerminationGracePeriodSeconds(14400L)


+ 0
- 9
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/FrameLogPathVo.java View File

@@ -9,7 +9,6 @@ import java.io.Serializable;
public class FrameLogPathVo implements Serializable {
String path;
String namespace;
String pvcName;

public String getPath() {
return path;
@@ -26,12 +25,4 @@ public class FrameLogPathVo implements Serializable {
public void setNamespace(String namespace) {
this.namespace = namespace;
}

public String getPvcName() {
return pvcName;
}

public void setPvcName(String pvcName) {
this.pvcName = pvcName;
}
}

Loading…
Cancel
Save