You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runtimeLicenseProduct: # Optional: Specify the type of product required for the Runtime License. This is applicable when PCLM is used for licensing. By default, the value is set to Standard, if left empty
172
172
deploymentStrategy: # Optional: Specify a deployment strategy to reduce app downtime
173
-
type: PreferRolling
174
173
switchoverThreshold: 50%
175
174
rollingUpdate:
176
175
maxSurge: 0
@@ -235,7 +234,7 @@ You must make the following changes:
235
234
* `leaderless` - A mode where the nodes dynamically choose a leader. This feature is in preview mode. It requires Mendix Runtime 10.24 or newer, and Mendix Operator 2.23 or newer.
236
235
* **customPodLabels** - Specify additional pod labels. Avoid using labels that start with the `privatecloud.mendix.com/` prefix.
237
236
* **general** - Specify additional labels for all pods of the app.
238
-
* **deploymentStrategy** - Specify parameters for the deployment strategy. For more information, see the reduced downtime deployment documentation.
237
+
* **deploymentStrategy** - Specify parameters for the deployment strategy. For more information, see the [reduced downtime deployment](/developerportal/deploy/private-cloud-reduced-downtime/#deployment-strategy-in-standalone) documentation.
239
238
* **runtimeReadOnlyRootFilesystem** - Specify if the Runtime container should mount the root filesystem in [read-only mode](/developerportal/deploy/private-cloud-cluster/#readonlyrootfs).
Copy file name to clipboardExpand all lines: content/en/docs/deployment/private-cloud/reduced-downtime-deployment.md
+32-34Lines changed: 32 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,41 @@ weight: 35
6
6
---
7
7
## Introduction
8
8
9
-
Kubernetes allows to update an app without downtime by [performing a rolling update](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/). Instead of stopping an app and then starting it with an updated version or configuration, Kubernetes can replace pods (replicas) one by one with an updated version. Existing pods handle requests until the newer version is fully started. Any changes in the [Data in the Domain Model](/refguide/domain-model/) need a database (schema) update. While the update process runs, you cannot modify any persistent entities.
9
+
Kubernetes allows to update an app without downtime by [performing a rolling update](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/). Instead of stopping an app and then starting it with an updated configuration, Kubernetes can replace pods (replicas) one by one.
10
10
11
-
The Mendix on Kubernetes Operator uses a [recreate](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#recreate-deployment) strategy by default. That is, the current version (configuration) of an app stops, and then the new version starts. Alternatively, the Mendix on Kubernetes Operator can use a **PreferRolling** strategy. That is, the Operator tries to perform a rolling update whenever possible. If the Operator detects that a database schema update is needed, it switches to a Recreate strategy to perform a full restart. If the new version of the app has model changes, deploying it requires a schema update. In this case, the Mendix on Kubernetes Operator automatically stops all replicas of the app, causing downtime.
11
+
The Mendix on Kubernetes Operator uses a [recreate](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#recreate-deployment) strategy by default. That is, the current version (configuration) of an app stops, and then the new version starts.
12
12
13
-
This feature works with Mendix on Kubernetes version 2.20 and later.
13
+
Starting from version 2.24.0, the Operator will automatically perform a Rolling update for any environment that meets the [prerequisites](#prerequisites-2.24.0).
14
+
15
+
1. The environment has 2 or more replicas.
16
+
2. The configuration update does not modify the app source code (MDA or container image).
17
+
18
+
{{% alert color="info" %}}
19
+
Versions 2.20.0 to 2.23.1 of the Operator had an option to manually enable a **PreferRolling** strategy. That is, the Operator tried to perform a rolling update whenever possible. If the Operator detected that a database schema update was needed, it switched to a Recreate strategy to perform a full restart. If the new version of the app had model changes, deploying it required a schema update. In that case, the Mendix on Kubernetes Operator automatically stopped all replicas of the app, causing downtime.
20
+
{{% /alert %}}
14
21
15
22
## Prerequisites
16
23
17
-
You can enable the `PreferRolling` deployment strategy if your environment fulfills the following requirements:
24
+
## Prerequisites for Operator version 2.24.0 and higher{#prerequisites-2.24.0}
25
+
26
+
The Operator will automatically perform a Rolling update for any environment that meets the following conditions:
27
+
28
+
* The environment has 2 or more replicas.
29
+
* The configuration update does not modify the app source code (MDA or container image).
18
30
19
-
* The app must have two or more replicas specified in the MendixApp CR or Developer Portal.
20
-
* For Connected environments, the **Low Downtime Deployment Strategy** option must be enabled in the Cloud Portal.
21
-
* For Standalone environments, **deploymentStrategy** must be set to **PreferRolling** in the MendixApp CR.
31
+
{{% alert color="warning" %}}
32
+
Mendix Operator versions 2.20.0 to 2.23.1 had a experimental feature that also performed database schema upgrades with a Rolling strategy.
33
+
This feature was removed in Operator 2.24.0, as it doesn't work well with the latest Mendix Runtime security features.
34
+
{{% /alert %}}
22
35
23
-
If the app can be deployed without having to modify the database schema (model), it will now be deployed using a Rolling deployment strategy.
36
+
## How the Operator chooses a deployment strategy
24
37
25
-
## How a PreferRolling Strategy Works
38
+
If any of the following conditions is true, the Operator will always use a **Recreate** strategy, performing a full stop of all of the app's replicas:
26
39
27
-
When the Operator is configured to use a **PreferRolling** strategy, it will try to do an optimistic update and use a **Rolling** strategy. If the app needs to perform a database schema update, it signals to the Operator that it is waiting for approval to perform the update. The Operator then switches the app to use a **Recreate** strategy (stop all current replicas and start an updated version) and wait until all replicas of the app are running the same MDA version. Then, the Operator lets the app know that it is safe to update the database schema, and approve the process.
40
+
* There are app pods that are running a different (older) version of the app image: there are changes in the app MDA or base OS image.
41
+
* The app environment has 1 replica.
42
+
43
+
Otherwise, the Operator will perform a **Rolling** update automatically.
28
44
29
45
As a **Rolling** strategy can run multiple versions of the app at the same time, requests from the browser must be routed to a matching app version (that is, an app that has the same microflow or nanoflow parameters). The Operator uses Kubernetes service labels to perform an atomic switch, and instantly switch all clients to the updated version. This is done automatically once the number of updated replicas reaches a certain threshold. By default the threshold is 50% of all replicas. The value is specified in the [switchoverThreshold](#prefer-rolling-in-standalone) parameter.
30
46
@@ -36,23 +52,13 @@ Whether a change can be performed without downtime depends on the type of the ch
36
52
* Changing environment variables, Runtime or Java options
37
53
* Changing Runtime Metrics settings
38
54
* Upgrading the Mendix Operator version
39
-
* Rebuilding the same MDA version to get the latest CVE updates
40
-
* Changes in microflows or Java actions that do not affect the model
41
-
* Updating Java dependencies
42
-
43
-
The following changes in the UI can be done without downtime, but as soon as the new version becomes available, all clients must log in again:
44
55
45
-
* Page changes, including layout or CSS changes
46
-
* Changes in nanoflows or microflow parameters, if the microflow is used on a page
47
-
* Changes in JavaScript actions
56
+
The following changes will cause a full restart and downtime:
48
57
49
-
The following changes will be deployed with downtime, because the model must be updated:
58
+
* Any changes that cause a modified MDA file
59
+
* Rebuilding the same MDA version with a different base image version (e.g. switching to another Java version or installing the latest CVE patches)
50
60
51
-
* Adding Marketplace modules that have persistent entities
52
-
* Updating the object model in the app itself, or its Marketplace modules
53
-
* Updating to a newer Mendix version
54
-
55
-
## Using the PreferRolling Strategy in Standalone Environments {#prefer-rolling-in-standalone}
61
+
## Configuring the Deployment Strategy parameters in Standalone Environments {#deployment-strategy-in-standalone}
56
62
57
63
To reduce deployment downtime, add the `deploymentStrategy` section to your `MendixApp` CR, as in the following example:
58
64
@@ -69,7 +75,6 @@ spec:
69
75
# ...
70
76
# Add or update this section:
71
77
deploymentStrategy:
72
-
type: PreferRolling
73
78
switchoverThreshold: 50%
74
79
rollingUpdate:
75
80
maxSurge: 0
@@ -78,13 +83,8 @@ spec:
78
83
79
84
For more information on the `MendixApp` CR, see [Editing CR](/developerportal/deploy/private-cloud-operator/#edit-cr).
80
85
81
-
If the `deploymentStrategy` is not specified, the Operator will use the Recreate strategy and perform a complete restart on any changes, causing downtime. This follows how updates were processed by Mendix on Kubernetes versions before 2.19 and earlier.
82
-
83
86
You can specify the following options:
84
87
85
-
* **type** – Specifies a type:
86
-
* **Recreate** - The default setting
87
-
* **PreferRolling** - Try to deploy without downtime when possible
88
88
* **switchoverThreshold** – Specifies a threshold of updated, ready replicas after which all clients should switch to the updated version. The threshold can be a percentage or an absolute value.
89
89
For example, setting this to **50%** will switch all clients to the updated app version once 50% of all replicas are running the updated version. If not otherwise specified, 50% is used as the default value. This option is only used if the strategy **type** is set to **PreferRolling**.
90
90
* **rollingUpdate** - Specifies parameters for rolling updates if the Operator is able to perform the update without a restart. These parameters are used as Kubernetes [rollingUpdate](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) parameters:
@@ -112,8 +112,6 @@ spec:
112
112
113
113
## Limitations
114
114
115
-
* This feature is only supported by Mendix Operator version 2.20 (and later).
116
-
* If the new app version has UI changes, all clients are automatically logged out and will need to sign back into the app.
117
-
* Deploying a new version of the app will cause downtime if there are changes in the domain model, or the Mendix version.
118
-
* If an app is based on Mendix 9.12 or a later version, a Rolling update can run scheduled events on any replica. During an update, scheduled events might use a newer or older version of their associated microflows, which will be random. If there are major changes in a scheduled event microflow, consider temporarily disabling scheduled events during an update.
115
+
* This feature is only supported by Mendix Operator version 2.24 (and later). Mendix Operator versions 2.20.0 to 2.23.1 used to have an experimental implementation of this feature; upgrading to 2.24.0 or later is highly recommended.
116
+
* Deploying a new version of the app will cause downtime if there are any changes in the app MDA or the base OS image.
119
117
* To ensure that scheduled events [are correctly synchronized at startup](/releasenotes/studio-pro/10.20/#improvements), it is recommended to use Mendix 10.20 or later.
Copy file name to clipboardExpand all lines: content/en/docs/releasenotes/deployment/mendix-for-private-cloud.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,14 @@ For information on the current status of deployment to Mendix on Kubernetes and
12
12
13
13
## 2025
14
14
15
+
### October ???, 2025
16
+
17
+
#### Mendix Operator v2.24.0 {#2.24.0}
18
+
19
+
* We've simplified the approach of handling Rolling updates by the Operator. Any app with 2 or more replicas will be updated without downtime, as long as the app is running the same MDA and base OS image.
20
+
* Starting from this version, all Operator upgrades will run without causing downtime (in environments that 2 or more replicas).
21
+
* We've made a few adjustments to support changes in upcoming Studio Pro version numbers.
0 commit comments