Repository navigation
Commit 04f845e
fix(helm): make health probes tolerate in-app server restarts (#42571)
## Description
Saving some admin settings restarts the server inside the Appsmith
container for about 45 seconds. The chart's probes ran every 60 s with
Kubernetes' default 1 s timeout and a failure threshold of 3. When three
restarts happened back to back, each one could land on a single liveness
check. Kubernetes counted three failures in a row and killed the
container mid-boot. This happened on nightly-saml on 2026-11-06 during
the SSO Sanity run.
`/api/v1/health` checks Mongo (1 s timeout) and Redis (3 s timeout) in
parallel. A slow but working server could therefore fail a 1 s probe.
Fixes https://linear.app/appsmith/issue/APP-16424
### Changes
- `templates/deployment.yaml`: each probe now sets `timeoutSeconds`,
which can be overridden. New defaults:
| Probe | periodSeconds | timeoutSeconds | failureThreshold | Effect |
|---|---|---|---|---|
| startup | 60 → 10 | 1 → 5 | 3 → 60 | 600 s to boot |
| liveness | 60 → 10 | 1 → 5 | 3 → 18 | restart after 180 s of
continuous failure |
| readiness | 60 → 10 | 1 → 5 | 3 | unready after 30 s, ready again
within 10 s |
One successful check resets the liveness count. A 45 s restart causes at
most about 5 failures, so even several restarts in a row cannot reach
18.
- `values.yaml`: documents the `probes` value, which the template
already read through `dig` but no one had documented. Keys: `port`,
`api` (the HTTP path), `periodSeconds`, `timeoutSeconds`,
`failureThreshold`. The `dig` fallbacks in the template match the new
defaults.
- `values.schema.json` and `README.md`: regenerated.
- Startup gets 600 s because a first boot runs every migration before
the server listens. On a remote Atlas cluster this took more than 3.5
minutes (APP-16275). The startup probe stops after its first success, so
the longer window costs nothing on a running server. (From #42574 by
@wyattwalter, merged into this branch.)
- `values.schema.json`: probe `periodSeconds`, `timeoutSeconds` and
`failureThreshold` accept an integer of at least 1, or a string of
digits with no leading zero. Chart 3.9.1 rendered quoted numbers such as
`"60"` as integers, so an upgrade that keeps such an override still
passes.
- `tests/probes_test.yaml`: new helm-unittest suite. It covers the
defaults, a partial override, and schema rejection of bad values. It
also checks that the template fallbacks equal the `values.yaml` defaults
when `probes` is unset. That matters because `helm upgrade
--reuse-values` from 3.9.1 renders through the fallbacks. The tests fail
against the old template and schema, and pass with this change.
- `scripts/deploy_preview.sh`: deploy previews set the startup probe to
10 s × 180 (30 minutes). The period is set explicitly, so the window
holds on published charts that still default to 60 s. Published charts
do not render `timeoutSeconds` yet, so previews keep the 1 s timeout
until a chart with this change is published. (From #42574.)
- `Chart.yaml`: 3.9.1 → 3.9.2. The snapshot is updated to match.
Call sites checked: the probes are defined only in
`templates/deployment.yaml`, which renders both the StatefulSet and the
Deployment. No other template defines a probe.
### Impact on existing instances
| State | What happens |
|---|---|
| Fresh install | Gets the new defaults. Liveness and readiness each
call `/api/v1/health` every 10 s (was every 60 s). That is 12 calls a
minute instead of 2. Each call is a Mongo ping and a Redis ping. |
| Upgrade from default | The pod spec changes, so `helm upgrade` rolls
the pod once. After that, behaviour matches a fresh install. |
| Upgrade from customized `probes` | Keys the user set still win,
because Helm merges user values over chart defaults key by key. Keys the
user did not set now take the new defaults. For example, a user who set
only `livenessProbe.failureThreshold: 3` now gets a 10 s period and a 5
s timeout, so the restart window shrinks from about 180 s to 30 s. Users
who tuned `failureThreshold` for a 60 s period should also set
`periodSeconds: 60`. The schema now validates `probes`. Quoted numbers
such as `failureThreshold: "5"` still work. Values that are not positive
integers, such as `0` or `"ten"`, now fail `helm install`/`upgrade` with
a schema error. Before, they reached Kubernetes and failed there. |
| Rollback to 3.9.1 | Restores the old probe values (60 s period, 1 s
timeout, threshold 3). An override that sets `probes.*.timeoutSeconds`
has no effect on 3.9.1, because that template ignores the key. 3.9.1 has
no schema for `probes`, so the rollback does not fail. |
### CE → EE sync
The EE chart is at 3.9.3, so the hourly sync will conflict on the
`Chart.yaml` version and the snapshot file. Resolution: set the EE
version to 3.9.4 and regenerate the snapshot with `helm unittest -u`. I
made a local copy of that end state on the EE side and checked it: 99/99
unit tests pass, the schema and README regenerate cleanly, and `helm
lint` passes.
### Follow-up (not in this PR)
The probe port defaults to `80` even when `HTTPContainerPort` is set. A
user who sets `HTTPContainerPort` must also set every `probes.*.port`.
## Automation
Not run. Cypress runs against the Docker image, not a Helm install, so
it cannot exercise this change. The chart's own CI covers it:
helm-unittest, the values schema check and helm-docs.
## Testing
Run locally from `deploy/helm`:
- `helm lint .` passes.
- `helm unittest .`: 21 suites, 103 tests pass.
- `helm schema …` and `helm-docs --sort-values-order file --dry-run`
both match the committed files.
- `helm lint . --set probes.livenessProbe.timeoutSeconds=0` is rejected
by the schema.
- Chart 3.9.2 is not yet published at helm.appsmith.com.
- [ ] Client unit tests
- [ ] Server unit tests
- [ ] Cypress
- [ ] Playwright
- [ ] Deploy preview
- [x] Not applicable
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: Cypress test results -->
> [!WARNING]
> Tests have not run on the HEAD
788e08a yet
> <hr>Fri, 06 Nov 2026 18:56:14 UTC
<!-- end of auto-generated comment: Cypress test results -->
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Wyatt Walter <wyattwalter@gmail.com>1 parent 3eb3f36 commit 04f845e
8 files changed
Lines changed: 316 additions & 21 deletions
File tree
- deploy/helm
- templates
- tests
- __snapshot__
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | | - | |
150 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
156 | | - | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
157 | | - | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
188 | | - | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
200 | 203 | | |
201 | 204 | | |
202 | 205 | | |
203 | | - | |
| 206 | + | |
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
| |||
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
233 | | - | |
| 236 | + | |
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| |||
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
256 | | - | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| |||
264 | 267 | | |
265 | 268 | | |
266 | 269 | | |
267 | | - | |
| 270 | + | |
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| |||
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
320 | | - | |
| 323 | + | |
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
| |||
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | | - | |
| 344 | + | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
0 commit comments