From e80287c33a481ac27fe71295cd4371b2a764704c Mon Sep 17 00:00:00 2001 From: slisson Date: Fri, 15 Nov 2024 18:47:03 +0100 Subject: [PATCH] feat: projector replaced with VNC --- .../common/workspace-client-deployment.yaml | 35 ++++++------------- .../common/workspace-client-service.yaml | 6 ++-- helm/modelix/values.yaml | 1 + 3 files changed, 15 insertions(+), 27 deletions(-) diff --git a/helm/modelix/templates/common/workspace-client-deployment.yaml b/helm/modelix/templates/common/workspace-client-deployment.yaml index d0bc3ab..75fd128 100644 --- a/helm/modelix/templates/common/workspace-client-deployment.yaml +++ b/helm/modelix/templates/common/workspace-client-deployment.yaml @@ -30,7 +30,7 @@ spec: effect: "NoExecute" containers: - name: workspace-client - image: "{{ .Values.dockerProxy.prefix }}modelix/modelix-workspace-client:{{ .Values.imageTags.wsClient | default .Values.versions.modelix.workspaces }}" + image: "{{ .Values.dockerProxy.prefix }}modelix/mps-vnc-baseimage:{{ .Values.versions.modelix.vncBaseImage }}-mps2024.1" imagePullPolicy: IfNotPresent env: - name: "modelix_executionMode" @@ -39,9 +39,11 @@ spec: value: "http://{{ include "modelix.fullname" . }}-workspace-manager:28104/" - name: MODEL_URI value: "http://{{ include "modelix.fullname" . }}-model:28101/" + - name: PRE_STARTUP_SCRIPT_URL + value: "http://{{ include "modelix.fullname" . }}-workspace-manager:28104/client/pre-startup.sh" ports: - - name: "projector" - containerPort: 8887 + - name: "vnc" + containerPort: 5800 - name: "jvmdebug" containerPort: 5071 - name: "yourkit" @@ -61,33 +63,18 @@ spec: limits: memory: "4.0Gi" # is replaced with the value in the workspace configuration cpu: "1.5" - # 8887 is the port used to access the MPS UI. - # http://localhost:8887/mainWindows can be used to list opened windows. - # See https://github.com/JetBrains/projector-client/blob/0f1e08a68f01c417a7ce8a58afe77d63603e22db/projector-server-core/src/main/kotlin/org/jetbrains/projector/server/core/websocket/HttpWsServer.kt#L68 - # The response is single line of JSON. - # Example responses values are: - # * `[]`, when no windows are opened yet - # * `[{"title":"splash","pngBase64Icon":null}]`, when the splash screen is loading - # * `[{"title":"","pngBase64Icon":"iVB<...>YII="}]`, when one project is opened - # - # With the different probes, we make sure to only redirect the user to the UI when MPS started. - # Use `wget` because `curl` does not exist in container. startupProbe: - exec: - command: ["/bin/sh", "-c", "wget -qO- http://localhost:8887/mainWindows | grep -vqF '[]'"] - # Give MPS and projector 2 minutes (12 * 10 seconds) to startup. + httpGet: + path: / + port: 5800 failureThreshold: 12 periodSeconds: 10 livenessProbe: - exec: - command: ["/bin/sh", "-c", "wget -qO- http://localhost:8887/mainWindows | grep -vqF '[]'"] + httpGet: + path: / + port: 5800 periodSeconds: 20 timeoutSeconds: 10 - readinessProbe: - exec: - command: ["/bin/sh", "-c", "wget -qO- http://localhost:8887/mainWindows | grep -vqF '[]'"] - periodSeconds: 5 - timeoutSeconds: 3 restartPolicy: Always {{- include "modelix.pullSecret" . | nindent 6 }} {{- end -}} \ No newline at end of file diff --git a/helm/modelix/templates/common/workspace-client-service.yaml b/helm/modelix/templates/common/workspace-client-service.yaml index 07e179f..f4a90cb 100644 --- a/helm/modelix/templates/common/workspace-client-service.yaml +++ b/helm/modelix/templates/common/workspace-client-service.yaml @@ -9,9 +9,9 @@ metadata: spec: type: NodePort ports: - - name: "projector" - port: 8887 - targetPort: "projector" + - name: "vnc" + port: 5800 + targetPort: "vnc" - name: "diff" port: 33334 targetPort: "diff" diff --git a/helm/modelix/values.yaml b/helm/modelix/values.yaml index a09bc8a..0bcb6d7 100644 --- a/helm/modelix/values.yaml +++ b/helm/modelix/values.yaml @@ -7,6 +7,7 @@ versions: workspaces: "0.3.2" core: "4.11.5" kubernetes: "0.1.2-dirty" + vncBaseImage: "0.6.0" imageTags: db: ""