|
| 1 | +apiVersion: v1 |
| 2 | +kind: ConfigMap |
| 3 | +metadata: |
| 4 | + name: "{{ include "modelix.fullname" . }}-workspace-client-templates" |
| 5 | +data: |
| 6 | + deployment: |- |
| 7 | + apiVersion: apps/v1 |
| 8 | + kind: Deployment |
| 9 | + metadata: |
| 10 | + labels: |
| 11 | + component: workspace-client |
| 12 | + {{- include "modelix.labels" . | nindent 8 }} |
| 13 | + name: "{{ include "modelix.fullname" . }}-workspace-client" |
| 14 | + spec: |
| 15 | + revisionHistoryLimit: 5 |
| 16 | + replicas: 0 |
| 17 | + strategy: |
| 18 | + type: RollingUpdate |
| 19 | + rollingUpdate: |
| 20 | + maxUnavailable: 0 |
| 21 | + maxSurge: 1 |
| 22 | + selector: |
| 23 | + matchLabels: |
| 24 | + component: workspace-client |
| 25 | + {{- include "modelix.selectorLabels" . | nindent 10 }} |
| 26 | + template: |
| 27 | + metadata: |
| 28 | + labels: |
| 29 | + component: workspace-client |
| 30 | + {{- include "modelix.selectorLabels" . | nindent 12 }} |
| 31 | + spec: |
| 32 | + tolerations: |
| 33 | + - key: "workspace-client" |
| 34 | + operator: "Exists" |
| 35 | + effect: "NoExecute" |
| 36 | + containers: |
| 37 | + - name: workspace-client |
| 38 | + image: "{{ .Values.dockerProxy.prefix }}modelix/mps-vnc-baseimage:{{ .Values.versions.modelix.vncBaseImage }}-mps2024.1" |
| 39 | + imagePullPolicy: Always |
| 40 | + env: |
| 41 | + - name: "modelix_executionMode" |
| 42 | + value: "PROJECTOR" |
| 43 | + - name: "modelix_workspace_server" |
| 44 | + value: "http://{{ include "modelix.fullname" . }}-workspace-manager:28104/" |
| 45 | + - name: MODEL_URI |
| 46 | + value: "http://{{ include "modelix.fullname" . }}-model:28101/" |
| 47 | + ports: |
| 48 | + - name: "vnc" |
| 49 | + containerPort: 5800 |
| 50 | + - name: "jvmdebug" |
| 51 | + containerPort: 5071 |
| 52 | + - name: "yourkit" |
| 53 | + containerPort: 10001 |
| 54 | + - name: "diff" |
| 55 | + containerPort: 33334 |
| 56 | + - name: "generator" |
| 57 | + containerPort: 33335 |
| 58 | + {{- range $index, $port := .Values.workspaces.client.customExposedPorts }} |
| 59 | + - name: "custom-port-{{ $index }}" |
| 60 | + containerPort: {{ $port }} |
| 61 | + {{- end }} |
| 62 | + resources: |
| 63 | + requests: |
| 64 | + memory: "4.0Gi" # is replaced with the value in the workspace configuration |
| 65 | + cpu: 500m |
| 66 | + limits: |
| 67 | + memory: "4.0Gi" # is replaced with the value in the workspace configuration |
| 68 | + cpu: "1.5" |
| 69 | + startupProbe: |
| 70 | + httpGet: |
| 71 | + path: / |
| 72 | + port: 5800 |
| 73 | + failureThreshold: 12 |
| 74 | + periodSeconds: 10 |
| 75 | + livenessProbe: |
| 76 | + httpGet: |
| 77 | + path: / |
| 78 | + port: 5800 |
| 79 | + periodSeconds: 20 |
| 80 | + timeoutSeconds: 10 |
| 81 | + restartPolicy: Always |
| 82 | + imagePullSecrets: |
| 83 | + - name: "{{ include "modelix.fullname" . }}-docker-registry-secret" |
| 84 | + service: | |
| 85 | + apiVersion: v1 |
| 86 | + kind: Service |
| 87 | + metadata: |
| 88 | + labels: |
| 89 | + component: workspace-client |
| 90 | + {{- include "modelix.labels" . | nindent 8 }} |
| 91 | + name: "{{ include "modelix.fullname" . }}-workspace-client" |
| 92 | + spec: |
| 93 | + type: ClusterIP |
| 94 | + ports: |
| 95 | + - name: "vnc" |
| 96 | + port: 5800 |
| 97 | + targetPort: "vnc" |
| 98 | + - name: "diff" |
| 99 | + port: 33334 |
| 100 | + targetPort: "diff" |
| 101 | + - name: "generator" |
| 102 | + port: 33335 |
| 103 | + targetPort: "generator" |
| 104 | + - name: "jvmdebug" |
| 105 | + port: 5071 |
| 106 | + targetPort: "jvmdebug" |
| 107 | + - name: "yourkit" |
| 108 | + port: 10001 |
| 109 | + targetPort: "yourkit" |
| 110 | + {{- range $index, $port := .Values.workspaces.client.customExposedPorts }} |
| 111 | + - name: "custom-port-{{ $index }}" |
| 112 | + port: {{ $port }} |
| 113 | + targetPort: "custom-port-{{ $index }}" |
| 114 | + {{- end }} |
| 115 | + selector: |
| 116 | + component: workspace-client |
| 117 | + {{- include "modelix.selectorLabels" . | nindent 8 }} |
0 commit comments