mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 05:35:07 +02:00
feat(logical-backup): add configurable job history limits and TTL
Adds three new configuration options for logical backup cronjobs: - logical_backup_successful_jobs_history_limit (default: 3) - logical_backup_failed_jobs_history_limit (default: 3) - logical_backup_ttl_seconds_after_finished (default: 86400) These options control how many completed/failed backup jobs are retained by Kubernetes and when finished jobs are automatically deleted. This prevents accumulation of old backup jobs and pods in namespaces with many PostgreSQL clusters. Also updates the CronJob comparison logic to detect changes in these new fields and trigger reconciliation when needed. Closes zalando/postgres-operator#1092
This commit is contained in:
@@ -561,6 +561,18 @@ spec:
|
||||
default: "30 00 * * *"
|
||||
logical_backup_cronjob_environment_secret:
|
||||
type: string
|
||||
logical_backup_failed_jobs_history_limit:
|
||||
type: integer
|
||||
minimum: 0
|
||||
default: 3
|
||||
logical_backup_successful_jobs_history_limit:
|
||||
type: integer
|
||||
minimum: 0
|
||||
default: 3
|
||||
logical_backup_ttl_seconds_after_finished:
|
||||
type: integer
|
||||
minimum: 0
|
||||
default: 86400
|
||||
debug:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -402,6 +402,12 @@ configLogicalBackup:
|
||||
logical_backup_schedule: "30 00 * * *"
|
||||
# secret to be used as reference for env variables in cronjob
|
||||
logical_backup_cronjob_environment_secret: ""
|
||||
# number of successful backup jobs to keep in cronjob history
|
||||
logical_backup_successful_jobs_history_limit: 3
|
||||
# number of failed backup jobs to keep in cronjob history
|
||||
logical_backup_failed_jobs_history_limit: 3
|
||||
# TTL in seconds after which finished backup jobs are automatically deleted
|
||||
logical_backup_ttl_seconds_after_finished: 86400
|
||||
|
||||
# automate creation of human users with teams API service
|
||||
configTeamsApi:
|
||||
|
||||
Reference in New Issue
Block a user