Skip to content

Commit

Permalink
Merge pull request #2 from modelix/MODELIX-745
Browse files Browse the repository at this point in the history
feat: add option to expose custom port from MPS
  • Loading branch information
odzhychko authored Apr 22, 2024
2 parents bbd6f54 + 9f856f2 commit 80fe1c1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
8 changes: 8 additions & 0 deletions helm/debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

set -e

cd "$(dirname "$0")"

# See https://helm.sh/docs/chart_template_guide/debugging/
helm install dev ./modelix -f dev.yaml --dry-run --debug
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ spec:
containerPort: 33334
- name: "generator"
containerPort: 33335
{{- range $index, $port := .Values.workspaces.client.customExposedPorts }}
- name: "custom-port-{{ $index }}"
containerPort: {{ $port }}
{{- end }}
resources:
requests:
memory: "4.0Gi" # is replaced with the value in the workspace configuration
Expand Down
20 changes: 11 additions & 9 deletions helm/modelix/templates/common/workspace-client-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,24 @@ spec:
ports:
- name: "projector"
port: 8887
targetPort: 8887
- name: "modelix-ui"
port: 33333
targetPort: 33333
targetPort: "projector"
- name: "diff"
port: 33334
targetPort: 33334
targetPort: "diff"
- name: "generator"
port: 33335
targetPort: 33335
- name: "debug"
targetPort: "generator"
- name: "jvmdebug"
port: 5071
targetPort: 5071
targetPort: "jvmdebug"
- name: "yourkit"
port: 10001
targetPort: 10001
targetPort: "yourkit"
{{- range $index, $port := .Values.workspaces.client.customExposedPorts }}
- name: "custom-port-{{ $index }}"
port: {{ $port }}
targetPort: "custom-port-{{ $index }}"
{{- end }}
selector:
component: workspace-client
{{- include "modelix.selectorLabels" . | nindent 4 }}
Expand Down
7 changes: 6 additions & 1 deletion helm/modelix/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ imageTags:
modelStorageSize: 3000Mi

# Maximal size of request body in mebibyte for ingress and proxy.
# Especially relevant for uploads in the workspace manger.
# Especially relevant for uploads in the workspace manager.
maxBodySize: 200

developmentMode: false
Expand All @@ -40,6 +40,11 @@ workspaces:
uploadsStorageSize: 5000Mi
manager:
memory: 600Mi
client:
# Ports as numbers which should be exposed from MPS.
#
# A use case is exposing custom servers running inside MPS.
customExposedPorts: []

ingress:
installController: true
Expand Down

0 comments on commit 80fe1c1

Please sign in to comment.