Browse Source

开发支持juicefs存储功能

dev-czh
chenzhihang 1 year ago
parent
commit
3a7eda377b
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/K8sClientUtil.java

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

@@ -341,6 +341,9 @@ public class K8sClientUtil {
}
}

int lastIndex = hostPath.lastIndexOf('/');
String newPath = hostPath.substring(0, lastIndex);

V1Pod pod = new V1PodBuilder()
.withNewMetadata()
.withName(podName)
@@ -368,7 +371,7 @@ public class K8sClientUtil {
.endContainer()
.addNewVolume()
.withName("workspace")
.withHostPath(new V1HostPathVolumeSource().path(hostPath).type("DirectoryOrCreate"))
.withHostPath(new V1HostPathVolumeSource().path(newPath).type("DirectoryOrCreate"))
// .withPersistentVolumeClaim(new V1PersistentVolumeClaimVolumeSource().claimName(pvcName))
.endVolume()
.withTerminationGracePeriodSeconds(14400L)


Loading…
Cancel
Save