|
|
@@ -100,12 +100,13 @@ public class JupyterServiceImpl implements JupyterService { |
|
|
String podName = loginUser.getUsername().toLowerCase() + "-editor-pod" + "-" + id; |
|
|
String podName = loginUser.getUsername().toLowerCase() + "-editor-pod" + "-" + id; |
|
|
String pvcName = loginUser.getUsername().toLowerCase() + "-editor-pvc"; |
|
|
String pvcName = loginUser.getUsername().toLowerCase() + "-editor-pvc"; |
|
|
//新建编辑器的pvc |
|
|
//新建编辑器的pvc |
|
|
V1PersistentVolumeClaim pvc = k8sClientUtil.createPvc(namespace, pvcName, storage, storageClassName); |
|
|
|
|
|
|
|
|
// V1PersistentVolumeClaim pvc = k8sClientUtil.createPvc(namespace, pvcName, storage, storageClassName); |
|
|
|
|
|
|
|
|
//TODO 设置镜像可配置,这里先用默认镜像启动pod |
|
|
//TODO 设置镜像可配置,这里先用默认镜像启动pod |
|
|
|
|
|
|
|
|
// 调用修改后的 createPod 方法,传入额外的参数 |
|
|
// 调用修改后的 createPod 方法,传入额外的参数 |
|
|
Integer podPort = k8sClientUtil.createConfiguredPod(podName, namespace, port, mountPath, pvc, devEnvironment, minioPvcName, datasetPath, modelPath); |
|
|
|
|
|
|
|
|
// Integer podPort = k8sClientUtil.createConfiguredPod(podName, namespace, port, mountPath, pvc, devEnvironment, minioPvcName, datasetPath, modelPath); |
|
|
|
|
|
Integer podPort = k8sClientUtil.createConfiguredPod(podName, namespace, port, mountPath, null, devEnvironment, minioPvcName, datasetPath, modelPath); |
|
|
String url = masterIp + ":" + podPort; |
|
|
String url = masterIp + ":" + podPort; |
|
|
redisService.setCacheObject(podName, masterIp + ":" + podPort); |
|
|
redisService.setCacheObject(podName, masterIp + ":" + podPort); |
|
|
devEnvironment.setStatus("Pending"); |
|
|
devEnvironment.setStatus("Pending"); |
|
|
|