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

View File

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