From a9854d4c026bec03f96850cd429c4f2770a5096d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=C3=ADel=20P=2E=20Purkh=C3=BAs?= Date: Mon, 26 May 2025 11:50:17 +0000 Subject: [PATCH] Allow usage of HPAs ## What? Remove the default replica values of `1` since that clashes with the usage of HPAs. Instead default to not setting `replicas`, which by default is `1`. --- charts/temporal/templates/server-deployment.yaml | 6 +++++- charts/temporal/templates/web-deployment.yaml | 2 ++ charts/temporal/values.yaml | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/charts/temporal/templates/server-deployment.yaml b/charts/temporal/templates/server-deployment.yaml index 97a38f92..6b8f1d2a 100644 --- a/charts/temporal/templates/server-deployment.yaml +++ b/charts/temporal/templates/server-deployment.yaml @@ -12,7 +12,11 @@ metadata: labels: {{- include "temporal.resourceLabels" (list $ $service "deployment") | nindent 4 }} spec: - replicas: {{ default $.Values.server.replicaCount $serviceValues.replicaCount }} + {{- if $serviceValues.replicaCount }} + replicas: {{ default $serviceValues.replicaCount }} + {{- else if $.Values.server.replicaCount }} + replicas: {{ default $.Values.server.replicaCount }} + {{- end }} selector: matchLabels: app.kubernetes.io/name: {{ include "temporal.name" $ }} diff --git a/charts/temporal/templates/web-deployment.yaml b/charts/temporal/templates/web-deployment.yaml index f1530c2b..54af0d3c 100644 --- a/charts/temporal/templates/web-deployment.yaml +++ b/charts/temporal/templates/web-deployment.yaml @@ -8,7 +8,9 @@ metadata: labels: {{- include "temporal.resourceLabels" (list $ "web" "deployment") | nindent 4 }} spec: + {{- if .Values.web.replicaCount }} replicas: {{ .Values.web.replicaCount }} + {{- end }} selector: matchLabels: app.kubernetes.io/name: {{ include "temporal.name" $ }} diff --git a/charts/temporal/values.yaml b/charts/temporal/values.yaml index d98a5ced..7078ddf9 100644 --- a/charts/temporal/values.yaml +++ b/charts/temporal/values.yaml @@ -22,8 +22,6 @@ server: repository: temporalio/server tag: 1.27.2 pullPolicy: IfNotPresent - # Global default settings (can be overridden per service) - replicaCount: 1 metrics: # Annotate pods directly with Prometheus annotations. # Use this if you installed Prometheus from a Helm chart. @@ -378,7 +376,6 @@ admintools: web: # additionalInitContainers: [] enabled: true - replicaCount: 1 image: repository: temporalio/ui tag: 2.37.1