c9da869d by Adam Heath

Expose more knobs on Cronjob/Job, move schedule into .job.

1 parent f139f51a
...@@ -18,11 +18,11 @@ metadata: ...@@ -18,11 +18,11 @@ metadata:
18 labels: 18 labels:
19 {{- include "postgresql-rclone.labels" . | nindent 4 }} 19 {{- include "postgresql-rclone.labels" . | nindent 4 }}
20 spec: 20 spec:
21 schedule: {{ .Values.backup.schedule }} 21 schedule: {{ .Values.backup.job.schedule }}
22 startingDeadlineSeconds: 3600 22 startingDeadlineSeconds: {{ .Values.backup.job.startingDeadlineSeconds }}
23 concurrencyPolicy: Forbid 23 concurrencyPolicy: Forbid
24 successfulJobsHistoryLimit: 10 24 successfulJobsHistoryLimit: {{ .Values.backup.job.successfulJobsHistoryLimit }}
25 failedJobsHistoryLimit: 10 25 failedJobsHistoryLimit: {{ .Values.backup.job.failedJobsHistoryLimit }}
26 jobTemplate: 26 jobTemplate:
27 spec: 27 spec:
28 template: 28 template:
......
...@@ -18,6 +18,7 @@ metadata: ...@@ -18,6 +18,7 @@ metadata:
18 labels: 18 labels:
19 {{- include "postgresql-rclone.labels" . | nindent 4 }} 19 {{- include "postgresql-rclone.labels" . | nindent 4 }}
20 spec: 20 spec:
21 ttlSecondsAfterFinished: {{ .Values.restore.ttlSecondsAfterFinished }}
21 template: 22 template:
22 spec: 23 spec:
23 restartPolicy: OnFailure 24 restartPolicy: OnFailure
......
...@@ -26,12 +26,18 @@ local: ...@@ -26,12 +26,18 @@ local:
26 backupKeepDays: 288 26 backupKeepDays: 288
27 27
28 backup: 28 backup:
29 job:
29 schedule: "13 3 * * *" 30 schedule: "13 3 * * *"
31 startingDeadlineSeconds: 3600
32 successfulJobsHistoryLimit: 10
33 failedJobsHistoryLimit: 10
30 pvc: 34 pvc:
31 storageClassName: "" 35 storageClassName: ""
32 size: 10Gi 36 size: 10Gi
33 37
34 restore: 38 restore:
39 job:
40 ttlSecondsAfterFinished: 120
35 pvc: 41 pvc:
36 storageClassName: "" 42 storageClassName: ""
37 size: 10Gi 43 size: 10Gi
......