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
7 changes: 4 additions & 3 deletions charts/temporal/templates/server-job.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- $jobName := include "temporal.componentname" (list $ (printf "schema-%s-%d" $.Chart.Version $.Release.Revision | replace "." "-")) }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "temporal.componentname" (list $ (printf "schema-%d" .Release.Revision | replace "." "-")) }}
name: {{ $jobName }}
labels:
{{- include "temporal.resourceLabels" (list $ "database" "") | nindent 4 }}
{{- with $.Values.schema.jobAnnotations }}
Expand All @@ -10,10 +11,10 @@ metadata:
{{- end }}
spec:
backoffLimit: {{ $.Values.schema.backoffLimit }}
ttlSecondsAfterFinished: 86400
ttlSecondsAfterFinished: {{ $.Values.schema.ttlSecondsAfterFinished }}
template:
metadata:
name: {{ include "temporal.componentname" (list $ (printf "schema-%d" .Release.Revision | replace "." "-")) }}
name: {{ $jobName }}
labels:
{{- include "temporal.resourceLabels" (list $ "database" "") | nindent 8 }}
{{- with $.Values.schema.podLabels }}
Expand Down
26 changes: 26 additions & 0 deletions charts/temporal/tests/server_job_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,29 @@ tests:
- equal:
path: spec.template.metadata.labels.custom-pod-label
value: ghi
- it: sets backoffLimit and ttlSecondsAfterFinished on the job
set:
server:
config:
persistence:
datastores:
default:
sql:
pluginName: mysql8
connectAddr: "temporal-persistence:3306"
databaseName: temporal
visibility:
sql:
pluginName: mysql8
connectAddr: "temporal-visibility:3306"
databaseName: temporal_visibility
schema:
backoffLimit: 5
ttlSecondsAfterFinished: 3600
asserts:
- equal:
path: spec.backoffLimit
value: 5
- equal:
path: spec.ttlSecondsAfterFinished
value: 3600
1 change: 1 addition & 0 deletions charts/temporal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ web:
podDisruptionBudget: {}
schema:
backoffLimit: 100
ttlSecondsAfterFinished: 86400
jobAnnotations: {}
podAnnotations: {}
podLabels: {}
Expand Down