Add ttlSecondsAfterFinished field to cronjob

Adding ttlSecondsAfterFinished option to the chart for db
clean up cronjob
Add history limit options
Add concurrency policy to forbid

Change-Id: I431a9a3692fee36f77c6037031965e58c2c343c0
This commit is contained in:
SPEARS, DUSTIN (ds443n) 2023-06-27 11:58:18 -04:00
parent 6609d561e1
commit 613dd89fb0
2 changed files with 8 additions and 1 deletions

View File

@ -28,9 +28,13 @@ metadata:
annotations: annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
spec: spec:
successfulJobsHistoryLimit: {{ .Values.endpoints.postgresql.history.success }}
failedJobsHistoryLimit: {{ .Values.endpoints.postgresql.history.failed }}
concurrencyPolicy: Forbid
schedule: {{ .Values.endpoints.postgresql.cleanup_schedule | quote }} schedule: {{ .Values.endpoints.postgresql.cleanup_schedule | quote }}
jobTemplate: jobTemplate:
spec: spec:
ttlSecondsAfterFinished: {{ .Values.endpoints.postgresql.ttl_finished }}
template: template:
metadata: metadata:
labels: labels:
@ -68,4 +72,3 @@ spec:
defaultMode: 0555 defaultMode: 0555
... ...
{{- end }} {{- end }}

View File

@ -326,8 +326,12 @@ endpoints:
postgresql: postgresql:
# frequency to run table purges # frequency to run table purges
cleanup_schedule: "0 1 * * *" cleanup_schedule: "0 1 * * *"
ttl_finished: 86400
# number of days to retain for the tasks table # number of days to retain for the tasks table
days_to_retain: "90" days_to_retain: "90"
history:
success: 3
failed: 1
name: postgresql name: postgresql
auth: auth:
admin: admin: