Skip to content

Commit 811f3a5

Browse files
Merge pull request mendix#9061 from zlogic/mx4pc-2.21-features
Release notes and documentation for Mendix for Private Cloud 2.21.0 (planned for release on Wednesday, February 19)
2 parents 4ac290f + bed4e45 commit 811f3a5

5 files changed

Lines changed: 60 additions & 3 deletions

File tree

content/en/docs/deployment/private-cloud/private-cloud-cluster/_index.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,11 @@ spec:
439439
limits:
440440
cpu: 1
441441
memory: 512Mi
442+
ephemeral-storage: 4Mi
442443
requests:
443444
cpu: 100m
444445
memory: 512Mi
446+
ephemeral-storage: 4Mi
445447
# ...
446448
# omitted lines for brevity
447449
# ...
@@ -462,30 +464,38 @@ spec:
462464
limits:
463465
cpu: 250m
464466
memory: 32Mi
467+
ephemeral-storage: 4Mi
465468
requests:
466469
cpu: 100m
467470
memory: 16Mi
471+
ephemeral-storage: 4Mi
468472
metricsSidecarResources:
469473
limits:
470474
cpu: 100m
471475
memory: 32Mi
476+
ephemeral-storage: 4Mi
472477
requests:
473478
cpu: 100m
474479
memory: 16Mi
480+
ephemeral-storage: 4Mi
475481
buildResources:
476482
limits:
477483
cpu: '1'
478484
memory: 256Mi
485+
ephemeral-storage: 2Gi
479486
requests:
480487
cpu: 250m
481488
memory: 64Mi
489+
ephemeral-storage: 2Gi
482490
runtimeResources:
483491
limits:
484492
cpu: 1000m
485493
memory: 512Mi
494+
ephemeral-storage: 256Mi
486495
requests:
487496
cpu: 100m
488497
memory: 512Mi
498+
ephemeral-storage: 256Mi
489499
runtimeLivenessProbe:
490500
initialDelaySeconds: 60
491501
periodSeconds: 15
@@ -629,9 +639,11 @@ resources:
629639
limits:
630640
cpu: 1
631641
memory: 512Mi
642+
ephemeral-storage: 256Mi
632643
requests:
633644
cpu: 100m
634645
memory: 512Mi
646+
ephemeral-storage: 256Mi
635647
```
636648

637649
This section allows the configuration of the lower and upper resource boundaries, the `requests` and `limits` respectively.
@@ -938,6 +950,20 @@ In most cases, this option is only needed when an app is partially scaled down (
938950
Some container runtimes or network configurations prevent a terminating pod from receiving traffic or opening new connections. The Mendix Runtime can still use its existing database connections from the connection pool and keep processing any running microflows and requests, but uploading files or calling external REST services may fail.
939951
{{% /alert %}}
940952

953+
### Read-only RootFS {#readonlyrootfs}
954+
955+
Mendix app container images are locked down by default - they run as a non-root user, cannot request elevated permissions, and file ownership and permissions prevent modification of system and critical paths. Kubernetes allows you to lock down containers even further, by mounting the container filesystem as read-only if the container's security context specifies [readOnlyRootFilesystem: true](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/). With this option enabled, any files and paths from the container image cannot be modified by any user.
956+
957+
Starting from Mendix Operator version 2.21.0, all system containers and pods use `readOnlyRootFilesystem` by default. It is possible to specify if an environment's app container should also have a read-only filesystem. For Mendix apps, the `readOnlyRootFilesystem` option is off by default, as some Java actions in marketplace modules might expect some paths to be writable.
958+
959+
If you enable the `runtimeReadOnlyRootFilesystem` option in the MendixApp CRD (for standalone clusters) or in the Private Cloud Portal, the Mendix app container also uses a read-only root filesystem. As Mendix apps needs certain paths to be writable, an [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) is used for writable paths. Each path is mounted as a separate `subPath` to keep data separated. The `emptyDir` size is set to the `ephemeral-storage` [resource limit](#advanced-resource-customization).
960+
961+
In addition to internal Mendix Runtime paths, `/tmp` is mounted for any temporary files that might be created through Java actions. For Java actions to work correctly, ensure that they only create files in `/tmp`, for example, by using the `File.createTempFile` or `File.createTempDirectory` Java methods.
962+
963+
{{% alert color="info" %}}
964+
If your app works without issues when read-only root filesystem is enabled, it is best to enable it wherever possible. We recommend using a non-production environment to validate that your app keeps working correctly with a read-only RootFS.
965+
{{% /alert %}}
966+
941967
### GKE Autopilot Workarounds {#gke-autopilot-workarounds}
942968

943969
In GKE Autopilot, one of the key features is its ability to automatically adjust resource settings based on the observed resource utilization of the containers. GKE Autopilot verifies the resource allocations and limits for all containers, and makes adjustments to deployments when the resources are not as per its requirements.
@@ -954,16 +980,20 @@ spec:
954980
limits:
955981
cpu: "1"
956982
memory: 256Mi
983+
ephemeral-storage: 2Gi
957984
requests:
958985
cpu: "1"
959986
memory: 256Mi
987+
ephemeral-storage: 2Gi
960988
metricsSidecarResources:
961989
limits:
962990
cpu: 100m
963991
memory: 32Mi
992+
ephemeral-storage: 4Mi
964993
requests:
965994
cpu: 100m
966995
memory: 32Mi
996+
ephemeral-storage: 4Mi
967997
```
968998

969999
Run the following command in order to update the core resources in the `OperatorConfiguration`:

content/en/docs/deployment/private-cloud/private-cloud-operator.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ spec:
7979
limits: # Upper limit - process will be stopped if it tries to use more
8080
cpu: 500m # 500 millicores - half of a vCPU
8181
memory: 512Mi # 512 megabytes - suitable for small-scale non-production apps
82+
ephemeral-storage: 256Mi # 256 megabytes - for temporary files such as generated Excel documents
8283
requests: # Lower limit - needs at least these resources
8384
cpu: 250m
8485
memory: 256Mi
86+
ephemeral-storage: 256Mi
8587
runtimeDeploymentPodAnnotations: # Optional, can be omitted : set custom annotations for Mendix Runtime Pods
8688
# example: inject the Linkerd proxy sidecar
8789
linkerd.io/inject: enabled
@@ -173,6 +175,7 @@ spec:
173175
rollingUpdate:
174176
maxSurge: 0
175177
maxUnavailable: 50%
178+
runtimeReadOnlyRootFilesystem: true # Optional: specify if the Mendix Runtime container should use a read-only root filesystem
176179
```
177180
178181
You need to make the following changes:
@@ -230,6 +233,7 @@ You need to make the following changes:
230233
* **customPodLabels** - specify additional pod labels (please avoid using labels that start with the `privatecloud.mendix.com/` prefix)
231234
* **general** - specify additional labels for all pods of the app
232235
* **deploymentStrategy** - specify parameters for the deployment strategy; for more information, see the reduced downtime deployment documentation.
236+
* **runtimeReadOnlyRootFilesystem** - specify if the Runtime container should mount the root filesystem in [read-only mode](/developerportal/deploy/private-cloud-cluster/#readonlyrootfs).
233237

234238
#### Setting App Constants{#set-app-constants}
235239

content/en/docs/deployment/private-cloud/private-cloud-supported-environments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If deploying to Red Hat OpenShift, you need to specify that specifically when cr
3636

3737
Mendix for Private Cloud Operator `v2.*.*` is the latest version which officially supports:
3838

39-
* Kubernetes versions 1.19 through 1.31
39+
* Kubernetes versions 1.19 through 1.32
4040
* OpenShift 4.6 through 4.17
4141

4242
{{% alert color="warning" %}}
@@ -65,7 +65,7 @@ To install the Mendix Operator, the cluster administrator will need permissions
6565
* Create roles in the target namespace or project
6666
* Create role bindings in the target namespace or project
6767

68-
The cluster should have at least 2 CPU cores and 2 GB memory *available*. This is enough to run one simple app - but does not include additional resources required by Kubernetes core components.
68+
The cluster should have at least 2 CPU cores, 2 GB memory and 3 GB ephemeral-storage available on a Kubernetes node. This is enough to run one simple app, but does not include additional resources required by Kubernetes core components.
6969

7070
In OpenShift, the cluster administrator must have a `system:admin` role.
7171

content/en/docs/deployment/private-cloud/private-cloud-upgrade-guide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@ This document describes how an existing installation of Mendix for Private Cloud
1212
This procedure allows you to upgrade to any supported (v1.9.0 and later) version of the Mendix for Private Cloud Operator.
1313

1414
{{% alert color="warning" %}}
15+
There are special considerations that you must be aware of in the following cases:
16+
17+
* when using the `mxpc-cli` installation and configuration tool version 2.20.1 or earlier.
18+
* when manually installing or upgrading CRDs with `kubectl apply`.
19+
1520
Upgrading the Mendix for Private Cloud Operator in a namespace will modify global resources such as Mendix Custom Resource Definitions in the cluster.
1621

1722
[Custom Resource Definitions](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) allow Mendix applications to be managed with Kubernetes APIs and tools such as `kubectl` and `oc`.
1823

1924
Once you have installed a particular version of the Mendix Operator into any namespace in the cluster, you should not install older versions of the Mendix Operator into the same cluster, even if they are in other namespaces. This is because all the CRDs are global resources and operators in all namespaces use the same one, which may not be compatible across versions.
25+
26+
Starting from `mxpc-cli` version 2.21.0, the installation or upgrade process checks to see if the CRDs in the cluster are newer than the CRDs bundled with `mxpc-cli`. If the cluster has newer CRDs, `mxpc-cli` will skip the CRD installation step and avoid downgrading CRDs.
2027
{{% /alert %}}
2128

2229
If you are using your own private registry, follow the [Migrating to Your Own Registry](/developerportal/deploy/private-cloud-migrating/) guide first

content/en/docs/releasenotes/deployment/mendix-for-private-cloud.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ For information on the current status of deployment to Mendix for Private Cloud
1212

1313
## 2025
1414

15+
### February 19, 2025
16+
17+
#### Mendix Operator v2.21.0 {#2.21.0}
18+
19+
* We have switched all system containers to use a read-only root filesystem. For Mendix app containers, we added an option to use a read-only rootfs, which is disabled by default.
20+
* We have added a default on ephemeral storage usage to ensure that temporary file storage is reserved and is limited, so that a container gets a guaranteed amount of temporary file storage that cannot be exceeded.
21+
* We have added a check in `mxpc-cli` to prevent CRD downgrades; starting from `mxpc-cli` version 2.21.0, the installation or upgrade process will keep cluster CRDs unchanged if the cluster has newer CRDs than what is included with the installer.
22+
* We have updated components to use the latest dependency versions in order to improve security score ratings for container images.
23+
* We have fixed a *Failed to determine if DDL migration needs approval* error message that sometimes appeared when using a **Recreate** deployment strategy. This error message does not mean that there is an issue, and can therefore be ignored.
24+
* We have updated documentation with information that Kubernetes 1.32 is supported by the Mendix Operator.
25+
* Upgrading to Mendix Operator v2.21.0 from a previous version will restart environments managed by that version of the Operator. Environments with 2 or more replicas and a **PreferRolling** update strategy will be restarted without downtime.
26+
27+
#### Important Upgrade Information
28+
29+
With the introduction of ephemeral storage requests and limits, building an app requires at least 2 GB of ephemeral storage available on the Kubernetes node. If your nodes do not have enough temporary storage, the build pods cannot start and their status remains **Pending**. To resolve this issue, you can lower the values for `ephemeral-storage` in the [buildResources](/developerportal/deploy/private-cloud-cluster/#resource-definition-ocm) configuration.
30+
1531
### February 12, 2025
1632

1733
#### Documentation Updates
@@ -38,7 +54,7 @@ For information on the current status of deployment to Mendix for Private Cloud
3854
* We have updated a library used to validate licenses to the latest non-alpha version.
3955
* We have updated documentation that OpenShift 4.17 and Postgres 17 are supported by the Mendix Operator.
4056
* We have addressed a rare deadlock situation which could prevent a failing environment from restarting.
41-
* Upgrading to Mendix Operator v2.20.0 from a previous version will restart environments managed by that version of the Operator. Environments with 2 or more replicas and a **PreferRolling** update strategy will be restarted without downtime.
57+
* Upgrading to Mendix Operator v2.20.1 from a previous version will restart environments managed by that version of the Operator. Environments with 2 or more replicas and a **PreferRolling** update strategy will be restarted without downtime.
4258

4359
#### Known Limitations
4460

0 commit comments

Comments
 (0)