Skip to content

Commit b4da094

Browse files
Publish R2025b (#35)
* Updated README.md for R2025b * R2025b Initial commit * Updated CPU utilization request * Updated MCR volume mount to be read-only * Aligned main_config default value --------- Co-authored-by: Eitan Steiner <esteiner@mathworks.com>
1 parent 63ffbf4 commit b4da094

File tree

11 files changed

+276
-102
lines changed

11 files changed

+276
-102
lines changed

.github/workflows/helm-chart.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
- Helm_artifacts
88

99
env:
10-
HELM_CHART_VERSION: 1.2.0
11-
MATLAB_APP_VERSION: "R2025a"
10+
HELM_CHART_VERSION: 1.3.0
11+
MATLAB_APP_VERSION: "R2025b"
1212

1313
jobs:
1414
release-helm-chart:

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Before starting, you need the following:
2525
* [Git™](https://git-scm.com/)
2626
* [Docker®](https://www.docker.com/)
2727
* Running [Kubernetes](https://kubernetes.io/) cluster that meets the following conditions:
28-
* Uses Kubernetes version 1.29 or later.
28+
* Uses Kubernetes version 1.32 or later.
2929
* Each MATLAB Production Server container in the Kubernetes cluster requires at least 1 CPU core and 2 GiB RAM.
3030
* [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) command-line tool that can access your Kubernetes cluster
3131
* [Helm](https://helm.sh/) package manager to install Helm charts that contain preconfigured Kubernetes resources for MATLAB Production Server
32-
* Uses Helm version v3.14 or later.
32+
* Uses Helm version v3.17 or later.
3333

3434
If you do not have a license, please contact your MathWorks representative [here](https://www.mathworks.com/company/aboutus/contact_us/contact_sales.html) or [request a trial license](https://www.mathworks.com/campaigns/products/trials.html?prodcode=PR).
3535

@@ -53,11 +53,11 @@ The Quick Start option only requires you to download a single file, rather than
5353
To accept the license terms, set global > agreeToLicense to "yes".
5454
To specify the address of the license server, set global > licenseServer using the format port_number@host.
5555
56-
Next, install the Helm chart for MATLAB Production Server R2025a by using the following `helm install` command:
56+
Next, install the Helm chart for MATLAB Production Server R2025b by using the following `helm install` command:
57+
```
58+
helm install -f <path/to/values-overrides.yaml> [-n <k8s-namespace>] --generate-name oci://containers.mathworks.com/matlab-prodserver-k8s --version 1.3.0
59+
```
5760
58-
```
59-
helm install -f <path/to/values-overrides.yaml> [-n <k8s-namespace>] --generate-name oci://containers.mathworks.com/matlab-prodserver-k8s --version 1.2.0
60-
```
6161
4. After the deployment is complete, upload the MATLAB Production Server deployable archive to your network file server or Azure file share. All users must have read permission to the deployable archive.
6262
6363
## Deployment Steps
@@ -70,7 +70,7 @@ The MATLAB Production Server on Kubernetes GitHub repository contains Helm chart
7070
```
7171
This repository includes Helm chart folders for each supported MATLAB Production Server release and a `values-overrides.yaml` file containing configuration options that apply across all release deployments.
7272
73-
2. Navigate to the Helm chart folder for the release you want to use. Replace `<release>` with the release version, for example, `R2025a`.
73+
2. Navigate to the Helm chart folder for the release you want to use. Replace `<release>` with the release version, for example, `R2025b`.
7474
```
7575
cd matlab-production-server-on-kubernetes/releases/<release>/matlab-prodserver
7676
```
@@ -87,7 +87,7 @@ The MATLAB Production Server on Kubernetes GitHub repository contains Helm chart
8787
```
8888
* `containers.mathworks.com` is the name of the container registry.
8989
* `matlab-production-server` is the name of the repository.
90-
* `<release-tag>` is the tag name of the MATLAB Production Server release, for example, `r2025a`.
90+
* `<release-tag>` is the tag name of the MATLAB Production Server release, for example, `r2025b`.
9191
9292
The `values.yaml` file specifies these values in the `productionServer` section, in the `registry`, `repository`, and `tag` variables, respectively.
9393
@@ -98,7 +98,7 @@ The MATLAB Production Server on Kubernetes GitHub repository contains Helm chart
9898
```
9999
* `containers.mathworks.com` is the name of the container registry.
100100
* `matlab-runtime` is the name of the repository.
101-
* `<release-tag>` is the tag name of the MATLAB Runtime release. Update this value to the release version of the MATLAB Runtime you are using, for example, `r2025a`. MATLAB Production Server supports MATLAB Runtime versions up to six releases back from the MATLAB Production Server version you are using.
101+
* `<release-tag>` is the tag name of the MATLAB Runtime release. Update this value to the release version of the MATLAB Runtime you are using, for example, `r2025b`. MATLAB Production Server supports MATLAB Runtime versions up to six releases back from the MATLAB Production Server version you are using.
102102
103103
The `values.yaml` file specifies these values in the `matlabRuntime` section, in the `registry`, `repository`, and `tag` variables, respectively.
104104

releases/R2022b/matlab-prodserver/values.yaml

Lines changed: 0 additions & 75 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
appVersion: "R2022b"
2+
appVersion: "R2025b"
33
description: MATLAB Production Server Helm chart for Kubernetes
44
name: matlab-prodserver-k8s
5-
version: 0.1.2
5+
version: 1.3.0
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Chart validation checks:
2+
3+
{{- define "checkConditionReplicaCount" -}}
4+
{{- if and (gt (int .Values.deploymentSettings.replicaCount) 1) .Values.matlabProductionServerSettings.autoDeploy.archivesApi.createPVC }}
5+
{{- if ne .Values.matlabProductionServerSettings.autoDeploy.archivesApi.accessMode "ReadWriteMany" }}
6+
{{- fail "Configuring multiple replicas requires PVC with ReadWriteMany Access-Mode." }}
7+
{{- end }}
8+
{{- end }}
9+
{{- end }}
10+
11+
{{- define "checkConditionVolumeType" -}}
12+
{{- if .Values.matlabProductionServerSettings.autoDeploy.archivesApi.enabled }}
13+
{{- $volumeType := .Values.matlabProductionServerSettings.autoDeploy.volumeType }}
14+
{{- if and (ne $volumeType "pvc") (ne $volumeType "empty") }}
15+
{{- fail "Configuring archives API is only supported with pvc or empty volume types." }}
16+
{{- end }}
17+
{{- end }}
18+
{{- end }}

releases/R2022b/matlab-prodserver/templates/mps-1-service-ingress.yaml renamed to releases/R2025b/matlab-prodserver/templates/mps-1-service-ingress.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ spec:
1919
type: ClusterIP
2020

2121
---
22+
{{- if .Values.global.ingressController.enabled }}
2223
apiVersion: networking.k8s.io/v1
2324
kind: Ingress
2425
metadata:
@@ -35,6 +36,15 @@ metadata:
3536
{{ end }}
3637
spec:
3738
ingressClassName: {{ .Values.global.ingressController.name }}
39+
{{ if .Values.global.ingressController.tls.enabled }}
40+
tls:
41+
- hosts:
42+
- {{ .Values.global.ingressController.domainBase }}
43+
{{- if .Values.global.ingressController.tls.secretName }}
44+
secretName: {{ .Values.global.ingressController.tls.secretName }}
45+
{{- end }}
46+
{{ end }}
47+
3848
rules:
3949
- host: {{ .Values.global.ingressController.domainBase }}
4050
http:
@@ -46,6 +56,7 @@ spec:
4656
name: matlab-production-server
4757
port:
4858
number: 9910
59+
{{- end }}
4960

5061
---
5162
{{ if and (.Values.optionalSettings.Prometheus.enabled) (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}

releases/R2022b/matlab-prodserver/templates/mps-2-configmap.yaml renamed to releases/R2025b/matlab-prodserver/templates/mps-2-configmap.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ data:
99
main_config: |
1010
--http 9910
1111
--ssl-verify-peer-mode no-verify-peer
12-
--ssl-protocols TLSv1.1,TLSv1.2
13-
--ssl-ciphers ALL
12+
--ssl-protocols TLSv1.2,TLSv1.3
13+
--ssl-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305
1414
--mcr-root /opt/matlabruntime/{{ .Values.images.matlabRuntime.variant }}
1515
--num-workers {{ .Values.matlabProductionServerSettings.numWorkers | default 1 }}
1616
--worker-restart-interval 12:00:00
@@ -24,7 +24,7 @@ data:
2424
--log-rotation-size 100MB
2525
--log-archive-root ./old_logs
2626
--log-archive-max-size 1GB
27-
--log-root ./log
27+
{{ ternary "--log-root ./log" "" .Values.matlabProductionServerSettings.localFileLogging }}
2828
--log-stdout
2929
--license {{ .Values.global.licenseServer | default "27000@hostname" }}
3030
--license-grace-period 2:30
@@ -42,7 +42,17 @@ data:
4242
--server-memory-threshold-overflow-action purge_responses
4343
--enable-discovery
4444
--enable-metrics
45+
{{ ternary "--enable-archive-management" "" .Values.matlabProductionServerSettings.autoDeploy.archivesApi.enabled }}
4546
--routes-file ./config/routes.json
47+
{{- if .Values.matlabProductionServerSettings.accessControl.enabled }}
48+
--access-control-provider OAuth2
49+
--access-control-config ./config/jwt_idp.json
50+
--access-control-policy ./config/ac_policy.json
51+
52+
jwt_idp.json: {{ .Values.matlabProductionServerSettings.accessControl.identityProvider | quote }}
53+
54+
ac_policy.json: {{ .Values.matlabProductionServerSettings.accessControl.policyRules | quote }}
55+
{{- end }}
4656

4757
{{- if .Values.optionalSettings.Redis.host }}
4858
mps_cache_config: |

releases/R2022b/matlab-prodserver/templates/mps-3-deployment.yaml renamed to releases/R2025b/matlab-prodserver/templates/mps-3-deployment.yaml

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#
22
# MATLAB Production Server instance
33
#
4+
{{- include "checkConditionVolumeType" . }}
5+
{{- include "checkConditionReplicaCount" . }}
6+
47
apiVersion: apps/v1
58
kind: Deployment
69
metadata:
@@ -19,6 +22,7 @@ spec:
1922
labels:
2023
app: mps
2124
annotations:
25+
checksum/config: {{ include (print $.Template.BasePath "/mps-2-configmap.yaml") . | sha256sum }}
2226
{{ if not .Values.optionalSettings.Prometheus.enabled }}
2327
prometheus.io/scrape: 'true'
2428
prometheus.io/path: '/api/metrics'
@@ -27,19 +31,29 @@ spec:
2731
spec:
2832
securityContext:
2933
runAsNonRoot: true
30-
runAsUser: 1000
31-
runAsGroup: 1000
34+
runAsUser: 1001
35+
runAsGroup: 1001
36+
{{- if .Values.matlabProductionServerSettings.autoDeploy.archivesApi.createPVC }}
37+
fsGroup: 1001
38+
{{- end }}
3239

3340
containers:
3441
- name: mps
35-
image: {{ .Values.images.productionServer.registry }}/{{ .Values.images.productionServer.repository }}:{{ .Values.images.productionServer.tag }}
42+
image: {{ .Values.global.images.registry | default .Values.images.productionServer.registry }}/{{ .Values.images.productionServer.repository }}:{{ .Values.images.productionServer.tag }}
3643
env:
3744
- name: AGREE_TO_MATHWORKS_SOFTWARE_LICENSE
38-
value: {{ .Values.global.agreeToLicense | default "no" | lower | quote }}
45+
value: {{ required "agreeToLicense must be set to \"yes\"." .Values.global.agreeToLicense | default "no" | lower | quote }}
3946
- name: AGREE_TO_MATLAB_RUNTIME_LICENSE
40-
value: {{ .Values.global.agreeToLicense | default "no" | lower | quote }}
47+
value: {{ required "agreeToLicense must be set to \"yes\"." .Values.global.agreeToLicense | default "no" | lower | quote }}
4148
- name: LD_LIBRARY_PATH
4249
value: "/opt/matlabruntime/{{ .Values.images.matlabRuntime.variant }}/runtime/glnxa64:/opt/matlabruntime/{{ .Values.images.matlabRuntime.variant }}/bin/glnxa64:/opt/matlabruntime/{{ .Values.images.matlabRuntime.variant }}/sys/os/glnxa64:/opt/matlabruntime/{{ .Values.images.matlabRuntime.variant }}/extern/bin/glnxa64:/opt/matlabruntime/{{ .Values.images.matlabRuntime.variant }}/sys/opengl/lib/glnxa64"
50+
{{ if .Values.optionalSettings.Redis.secretName }}
51+
- name: MPS_REDIS_PASSWORD
52+
valueFrom:
53+
secretKeyRef:
54+
name: {{ .Values.optionalSettings.Redis.secretName }}
55+
key: {{ .Values.optionalSettings.Redis.secretKey | default "redis-password" }}
56+
{{ end }}
4357

4458
ports:
4559
- containerPort: 9910
@@ -49,14 +63,15 @@ spec:
4963
cpu: {{ .Values.deploymentSettings.cpuRequest | default "1" | quote }}
5064
memory: {{ .Values.deploymentSettings.memoryRequest | default "2Gi" | quote }}
5165
limits:
52-
cpu: {{ .Values.matlabProductionServerSettings.numWorkers | default "1" | quote }}
53-
memory: "8Gi"
66+
cpu: {{ .Values.deploymentSettings.cpuLimit | default "1" | quote }}
67+
memory: {{ .Values.deploymentSettings.memoryLimit | default "8Gi" | quote }}
5468

5569
volumeMounts:
5670
- name: auto-deploy
5771
mountPath: "/opt/mpsinstance/auto_deploy"
5872
- name: mcr-root
5973
mountPath: "/opt/matlabruntime"
74+
readOnly: true
6075
- name: mps-config
6176
mountPath: "/opt/mpsinstance/config"
6277

@@ -65,7 +80,7 @@ spec:
6580
command:
6681
- ls
6782
- /opt/matlabruntime/{{ .Values.images.matlabRuntime.variant }}/matlabruntime_license_agreement.pdf
68-
initialDelaySeconds: 30
83+
initialDelaySeconds: 10
6984
periodSeconds: 30
7085

7186
livenessProbe:
@@ -84,13 +99,21 @@ spec:
8499

85100
initContainers:
86101
- name: matlab-runtime
87-
image: {{ .Values.images.matlabRuntime.registry }}/{{ .Values.images.matlabRuntime.repository }}:{{ .Values.images.matlabRuntime.tag }}
102+
image: {{ .Values.global.images.registry | default .Values.images.matlabRuntime.registry }}/{{ .Values.images.matlabRuntime.repository }}:{{ .Values.images.matlabRuntime.tag }}
88103

89104
command:
90105
- /bin/sh
91106
- -c
92107
- "cp -r /opt/matlabruntime/* /mnt/"
93108

109+
resources:
110+
requests:
111+
cpu: {{ .Values.deploymentSettings.cpuRequest | default "1" | quote }}
112+
memory: {{ .Values.deploymentSettings.memoryRequest | default "2Gi" | quote }}
113+
limits:
114+
cpu: {{ .Values.deploymentSettings.cpuLimit | default "1" | quote }}
115+
memory: {{ .Values.deploymentSettings.memoryLimit | default "8Gi" | quote }}
116+
94117
volumeMounts:
95118
- name: mcr-root
96119
mountPath: "/mnt"
@@ -99,10 +122,13 @@ spec:
99122

100123
restartPolicy: {{ .Values.deploymentSettings.restartPolicy }}
101124
imagePullSecrets:
125+
{{- if .Values.global.images.pullSecret }}
126+
- name: {{ .Values.global.images.pullSecret }}
127+
{{- end }}
102128
{{- if .Values.images.productionServer.pullSecret }}
103129
- name: {{ .Values.images.productionServer.pullSecret }}
104130
{{- end }}
105-
{{- if .Values.images.matlabRuntime.pullSecret }}
131+
{{- if and .Values.images.matlabRuntime.pullSecret (ne .Values.images.matlabRuntime.pullSecret .Values.images.productionServer.pullSecret) }}
106132
- name: {{ .Values.images.matlabRuntime.pullSecret }}
107133
{{- end }}
108134

@@ -113,7 +139,19 @@ spec:
113139
configMap:
114140
name: matlab-production-server-config
115141
- name: auto-deploy
116-
{{- if eq .Values.matlabProductionServerSettings.autoDeploy.volumeType "hostpath" }}
142+
{{- if .Values.matlabProductionServerSettings.autoDeploy.archivesApi.enabled }}
143+
# Valid options when archives API is enabled: createPVC: true / volumeType: pvc / empty
144+
{{- if .Values.matlabProductionServerSettings.autoDeploy.archivesApi.createPVC }}
145+
persistentVolumeClaim:
146+
claimName: dynamic-auto-deploy
147+
{{- else if eq .Values.matlabProductionServerSettings.autoDeploy.volumeType "pvc" }}
148+
persistentVolumeClaim:
149+
claimName: {{ .Values.matlabProductionServerSettings.autoDeploy.claimName }}
150+
{{ else }}
151+
emptyDir: {}
152+
{{- end }}
153+
# Valid options for predef static volume: hostpath / nfs / pvc / azurefileshare / empty
154+
{{- else if eq .Values.matlabProductionServerSettings.autoDeploy.volumeType "hostpath" }}
117155
hostPath:
118156
path: {{ .Values.matlabProductionServerSettings.autoDeploy.hostpath }}
119157
type: Directory
@@ -122,6 +160,9 @@ spec:
122160
server: {{ .Values.matlabProductionServerSettings.autoDeploy.server }}
123161
path: {{ .Values.matlabProductionServerSettings.autoDeploy.path }}
124162
readOnly: true
163+
{{- else if eq .Values.matlabProductionServerSettings.autoDeploy.volumeType "pvc" }}
164+
persistentVolumeClaim:
165+
claimName: {{ .Values.matlabProductionServerSettings.autoDeploy.claimName }}
125166
{{- else if eq .Values.matlabProductionServerSettings.autoDeploy.volumeType "azurefileshare" }}
126167
azureFile:
127168
shareName: {{ .Values.matlabProductionServerSettings.autoDeploy.shareName }}

0 commit comments

Comments
 (0)