use of io.fabric8.kubernetes.api.model.VolumeMountBuilder in project che by eclipse.
the class OpenShiftConnector method getVolumeMountsFrom.
private List<VolumeMount> getVolumeMountsFrom(String[] volumes, String workspaceID) {
List<VolumeMount> vms = new ArrayList<>();
for (String volume : volumes) {
String mountPath = volume.split(":", 3)[1];
String volumeName = getVolumeName(volume);
VolumeMount vm = new VolumeMountBuilder().withMountPath(mountPath).withName("ws-" + workspaceID + "-" + volumeName).build();
vms.add(vm);
}
return vms;
}
Aggregations