Skip to content

Commit 85ec351

Browse files
fix(slime): render spec.replicas correctly when Values.replicas is 0
Go template truthiness treats numeric 0 as falsy, so the previous `.Values.replicas` check skipped the `replicas:` block when replicas was explicitly set to 0. Kubernetes then defaulted the Deployment to 1 replica. Switch to `(ne .Values.replicas nil)` to distinguish "unset" from "explicitly 0", matching the existing pattern in the php chart. Bump chart version 1.3.1 -> 1.3.2 (patch / bugfix). Refs: SREP-4455
1 parent b653afa commit 85ec351

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

slime/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.3.1
18+
version: 1.3.2

slime/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ metadata:
1515
{{- toYaml . | nindent 4 }}
1616
{{- end }}
1717
spec:
18-
{{- if and (not .Values.autoscaling.enabled) .Values.replicas }}
18+
{{- if and (not .Values.autoscaling.enabled) (ne .Values.replicas nil) }}
1919
replicas: {{ .Values.replicas }}
2020
{{- end }}
2121
selector:

0 commit comments

Comments
 (0)