diff --git a/charts/temporal/templates/server-deployment.yaml b/charts/temporal/templates/server-deployment.yaml index 268512aa..2c4af15b 100644 --- a/charts/temporal/templates/server-deployment.yaml +++ b/charts/temporal/templates/server-deployment.yaml @@ -14,7 +14,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 }} {{- with (default $.Values.server.deploymentStrategy $serviceValues.deploymentStrategy) }} strategy: {{- toYaml . | nindent 4 }} diff --git a/charts/temporal/templates/web-deployment.yaml b/charts/temporal/templates/web-deployment.yaml index 52fc40e9..44a11d3c 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/tests/server_deployment_test.yaml b/charts/temporal/tests/server_deployment_test.yaml index fc66a06b..b3e13e2e 100644 --- a/charts/temporal/tests/server_deployment_test.yaml +++ b/charts/temporal/tests/server_deployment_test.yaml @@ -45,6 +45,19 @@ tests: - equal: path: spec.replicas value: 3 + - it: omits replica count when neither service specific nor service wide is set + template: templates/server-deployment.yaml + documentSelector: + path: metadata.name + value: RELEASE-NAME-temporal-frontend + set: + server: + replicaCount: null + frontend: + replicaCount: null + asserts: + - notExists: + path: spec.replicas - it: defaults to service wide resources template: templates/server-deployment.yaml documentSelector: @@ -310,9 +323,9 @@ tests: server: history: readinessProbe: - initialDelaySeconds: 300 - tcpSocket: - port: rpc + initialDelaySeconds: 300 + tcpSocket: + port: rpc asserts: - equal: path: spec.template.spec.containers[0].readinessProbe.initialDelaySeconds diff --git a/charts/temporal/values.yaml b/charts/temporal/values.yaml index 7dc842e9..6644a6ba 100644 --- a/charts/temporal/values.yaml +++ b/charts/temporal/values.yaml @@ -23,8 +23,8 @@ server: tag: 1.29.2 pullPolicy: IfNotPresent # Global default settings (can be overridden per service) - replicaCount: 1 - readinessProbe: {} + # replicaCount: 1 + # readinessProbe: {} metrics: # Annotate pods and services directly with the following Prometheus annotations. # prometheus.io/job @@ -440,7 +440,7 @@ admintools: web: # additionalInitContainers: [] enabled: true - replicaCount: 1 + # replicaCount: 1 image: repository: temporalio/ui tag: 2.42.1