|
|
|
@@ -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) |
|
|
|
|