Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deployment configurations #3

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 -}}
Loading