Skip to content

Commit

Permalink
Merge pull request #3 from modelix/0.3.1-RC1
Browse files Browse the repository at this point in the history
Fix deployment configurations
  • Loading branch information
odzhychko authored Jul 3, 2024
2 parents 80fe1c1 + 4ef3a95 commit 60f7db6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ This Helm chart is tightly coupled and has to be developed in together with [Mod
./helm/install.sh
```

> [!NOTE]
> If you already have the chart installed, you can run:
> ```shell
> ./helm/upgrade.sh
> ```
> This will only update all images while keeping all data.


### Making changes to [Modelix Workspace components](https://github.com/modelix/modelix.workspaces)

1. Follow the [instructions in Modelix Workspace components](https://github.com/modelix/modelix.workspaces?tab=readme-ov-file#development) to build OCI images with local changes.
Expand Down
41 changes: 27 additions & 14 deletions helm/modelix/templates/common/workspace-client-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,33 @@ spec:
limits:
memory: "4.0Gi" # is replaced with the value in the workspace configuration
cpu: "1.5"
# readinessProbe:
# httpGet:
# path: /
# port: 8887
# initialDelaySeconds: 10
# periodSeconds: 5
# timeoutSeconds: 3
# livenessProbe:
# httpGet:
# path: /
# port: 8887
# initialDelaySeconds: 120
# periodSeconds: 20
# timeoutSeconds: 10
# 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":"<projectName>","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.
failureThreshold: 12
periodSeconds: 10
livenessProbe:
exec:
command: ["/bin/sh", "-c", "wget -qO- http://localhost:8887/mainWindows | grep -vqF '[]'"]
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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
- mountPath: "/workspace-manager/modelix-workspaces/uploads"
name: "{{ include "modelix.fullname" . }}-workspace-uploads"
- name: "{{ include "modelix.fullname" . }}-workspace-secret"
mountPath: /secrets/workspacesecret/workspace-credentials-key.txt
mountPath: /secrets/workspacesecret
readOnly: true
restartPolicy: Always
volumes:
Expand All @@ -82,5 +82,8 @@ spec:
- name: "{{ include "modelix.fullname" . }}-workspace-secret"
secret:
secretName: "{{ include "modelix.fullname" . }}-workspace-secret"
items:
- key: workspace-secret
path: workspace-credentials-key.txt
{{- include "modelix.pullSecret" . | nindent 6 }}
{{- end -}}

0 comments on commit 60f7db6

Please sign in to comment.