From 85ec3517d8c6d29996660c60d1700c5dd56a00bc Mon Sep 17 00:00:00 2001 From: kb-ykimura Date: Thu, 14 May 2026 10:00:08 +0900 Subject: [PATCH] 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 --- slime/Chart.yaml | 2 +- slime/templates/deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/slime/Chart.yaml b/slime/Chart.yaml index 87d009d1..f5e797f1 100644 --- a/slime/Chart.yaml +++ b/slime/Chart.yaml @@ -15,4 +15,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.3.1 +version: 1.3.2 diff --git a/slime/templates/deployment.yaml b/slime/templates/deployment.yaml index e5330786..def2ded7 100644 --- a/slime/templates/deployment.yaml +++ b/slime/templates/deployment.yaml @@ -15,7 +15,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- if and (not .Values.autoscaling.enabled) .Values.replicas }} + {{- if and (not .Values.autoscaling.enabled) (ne .Values.replicas nil) }} replicas: {{ .Values.replicas }} {{- end }} selector: