From 2335935a3efbaf2876c389f2d9604bcd027dafca Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Wed, 12 Nov 2025 17:53:01 +0000 Subject: [PATCH] Add conditional rendering for app.enabled in app.yaml --- HelmChart/Public/oneuptime/templates/app.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HelmChart/Public/oneuptime/templates/app.yaml b/HelmChart/Public/oneuptime/templates/app.yaml index 9af8dda262..ecfc157085 100644 --- a/HelmChart/Public/oneuptime/templates/app.yaml +++ b/HelmChart/Public/oneuptime/templates/app.yaml @@ -1,3 +1,4 @@ +{{- if $.Values.app.enabled }} # OneUptime app Deployment apiVersion: apps/v1 kind: Deployment @@ -16,7 +17,7 @@ spec: selector: matchLabels: app: {{ printf "%s-%s" $.Release.Name "app" }} - {{- if $.Values.app.replicaCount }} + {{- if and $.Values.app (hasKey $.Values.app "replicaCount") (ne $.Values.app.replicaCount nil) }} replicas: {{ $.Values.app.replicaCount }} {{- else }} {{- if or (not $.Values.autoscaling.enabled) ($.Values.app.disableAutoscaler) }} @@ -140,3 +141,4 @@ spec: {{- include "oneuptime.autoscaler" $appAutoScalerArgs }} {{- end }} --- +{{- end }}