Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion charts/temporal/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/temporal/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ metadata:
labels:
{{- include "temporal.resourceLabels" (list $ "web" "deployment") | nindent 4 }}
spec:
{{- if .Values.web.replicaCount }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with is cleaner here to avoid repeating the setting path.

replicas: {{ .Values.web.replicaCount }}
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
Expand Down
19 changes: 16 additions & 3 deletions charts/temporal/tests/server_deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions charts/temporal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ server:
tag: 1.29.2
pullPolicy: IfNotPresent
# Global default settings (can be overridden per service)
replicaCount: 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave this here (especially the comment). Just comment out the setting.

readinessProbe: {}
# replicaCount: 1
# readinessProbe: {}
metrics:
# Annotate pods and services directly with the following Prometheus annotations.
# prometheus.io/job
Expand Down Expand Up @@ -440,7 +440,7 @@ admintools:
web:
# additionalInitContainers: []
enabled: true
replicaCount: 1
# replicaCount: 1
image:
repository: temporalio/ui
tag: 2.42.1
Expand Down