Skip to content

Commit 7046aeb

Browse files
authored
fix: allow helm chart to support 0 replicas (#41444)
## Description The `| default ` is interpreting `0` as falsey, so it's setting to 1 when `replicas` is set to the value `0`. Added a unit test to cover this use case as well. Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!WARNING] > Tests have not run on the HEAD 3f096f2 yet > <hr>Wed, 03 Dec 2025 21:40:23 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated Helm chart version to 3.6.7 * **Behavior** * Deployment replica handling no longer falls back to an implicit default — the configured replica value is used as-is when autoscaling is disabled * **Tests** * Added tests verifying default-replica behavior and explicit zero-replica scenarios when autoscaling is disabled <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent cc1ea71 commit 7046aeb

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

deploy/helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sources:
1111
- https://github.com/appsmithorg/appsmith
1212
home: https://www.appsmith.com/
1313
icon: https://assets.appsmith.com/appsmith-icon.png
14-
version: 3.6.6
14+
version: 3.6.7
1515
dependencies:
1616
- condition: redis.enabled
1717
name: redis

deploy/helm/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ metadata:
1414
spec:
1515
{{- if $useDeployment }}
1616
{{- if not .Values.autoscaling.enabled }}
17-
replicas: {{ .Values.replicas | default 1 }}
17+
replicas: {{ .Values.replicas }}
1818
{{- end }}
1919
strategy:
2020
type: {{ .Values.strategyType | default "RollingUpdate" }}

deploy/helm/tests/__snapshot__/defaults_snapshot_test.yaml.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
app.kubernetes.io/instance: RELEASE-NAME
2626
app.kubernetes.io/managed-by: Helm
2727
app.kubernetes.io/name: appsmith
28-
appsmith.sh/chart: appsmith-3.6.6
28+
appsmith.sh/chart: appsmith-3.6.7
2929
name: RELEASE-NAME-appsmith
3030
namespace: NAMESPACE
3131
3: |
@@ -36,7 +36,7 @@
3636
app.kubernetes.io/instance: RELEASE-NAME
3737
app.kubernetes.io/managed-by: Helm
3838
app.kubernetes.io/name: appsmith
39-
appsmith.sh/chart: appsmith-3.6.6
39+
appsmith.sh/chart: appsmith-3.6.7
4040
name: RELEASE-NAME-appsmith
4141
namespace: NAMESPACE
4242
spec:
@@ -142,7 +142,7 @@
142142
app.kubernetes.io/instance: RELEASE-NAME
143143
app.kubernetes.io/managed-by: Helm
144144
app.kubernetes.io/name: appsmith
145-
appsmith.sh/chart: appsmith-3.6.6
145+
appsmith.sh/chart: appsmith-3.6.7
146146
name: RELEASE-NAME-appsmith-headless
147147
namespace: NAMESPACE
148148
spec:
@@ -181,7 +181,7 @@
181181
app.kubernetes.io/instance: RELEASE-NAME
182182
app.kubernetes.io/managed-by: Helm
183183
app.kubernetes.io/name: appsmith
184-
appsmith.sh/chart: appsmith-3.6.6
184+
appsmith.sh/chart: appsmith-3.6.7
185185
name: RELEASE-NAME-appsmith
186186
namespace: NAMESPACE
187187
spec:
@@ -202,7 +202,7 @@
202202
app.kubernetes.io/instance: RELEASE-NAME
203203
app.kubernetes.io/managed-by: Helm
204204
app.kubernetes.io/name: appsmith
205-
appsmith.sh/chart: appsmith-3.6.6
205+
appsmith.sh/chart: appsmith-3.6.7
206206
name: RELEASE-NAME-appsmith
207207
namespace: NAMESPACE
208208
secrets:

deploy/helm/tests/workload_type_test.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ tests:
66
- equal:
77
path: kind
88
value: StatefulSet
9-
- name: workload type should be Deployment when set
9+
- name: workload type should be Deployment when set and replicas default to 1
1010
set:
1111
workload:
1212
kind: Deployment
1313
asserts:
1414
- equal:
1515
path: kind
1616
value: Deployment
17+
- equal:
18+
path: spec.replicas
19+
value: 1
1720
- name: replica count should be used when set
1821
set:
1922
workload:
@@ -31,3 +34,14 @@ tests:
3134
- equal:
3235
path: kind
3336
value: Deployment
37+
- name: replica count should be 0 when set to 0
38+
set:
39+
workload:
40+
kind: Deployment
41+
autoscaling:
42+
enabled: false
43+
replicas: 0
44+
asserts:
45+
- equal:
46+
path: spec.replicas
47+
value: 0

0 commit comments

Comments
 (0)