postgres-operator/pkg/cluster
Jociele Padilha e4e686588e
Fix/logical backup job cleanup (#3111)
* 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

* add added the 3 new fieldson crd

* updated gen api

---------

Co-authored-by: Jairo Llopis <jairo@moduon.team>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-19 12:12:58 +02:00
..
cluster.go Fix/logical backup job cleanup (#3111) 2026-06-19 12:12:58 +02:00
cluster_test.go Fix/logical backup job cleanup (#3111) 2026-06-19 12:12:58 +02:00
connection_pooler.go feat: implement service type NodePort (#2986) 2026-06-12 10:02:26 +02:00
connection_pooler_new_test.go Connection pooler for replica (#1127) 2020-11-13 14:52:21 +01:00
connection_pooler_test.go feat: implement service type NodePort (#2986) 2026-06-12 10:02:26 +02:00
database.go stop retention user cleanup early again when DB connection attempt fails (#2999) 2025-12-10 10:01:07 +01:00
exec.go fix golangci-lint issues (#2715) 2024-08-14 12:54:44 +02:00
filesystems.go reflect change in github url (#496) 2019-02-25 11:26:55 +01:00
k8sres.go Fix/logical backup job cleanup (#3111) 2026-06-19 12:12:58 +02:00
k8sres_test.go Fix/logical backup job cleanup (#3111) 2026-06-19 12:12:58 +02:00
majorversionupgrade.go Remove hardcoded VersionMap from majorversionupgrade (#3043) 2026-03-02 11:13:10 +01:00
pod.go Fix rolling update deadlock when pods are stuck in non-running state (#3051) 2026-04-28 12:08:34 +02:00
pod_test.go Fix rolling update deadlock when pods are stuck in non-running state (#3051) 2026-04-28 12:08:34 +02:00
resources.go feat: implement service type NodePort (#2986) 2026-06-12 10:02:26 +02:00
streams.go do not remove publications of slot defined in manifest (#2868) 2025-02-26 17:31:37 +01:00
streams_test.go fix flaky comparison unit test of retruned errors (#2822) 2024-12-19 17:35:01 +01:00
sync.go Add cluster_labels and annotations to logical backup CronJob and Jobs (#3085) 2026-06-10 18:18:54 +02:00
sync_test.go do not reset secrets of standby clusters (#3044) 2026-02-26 17:27:47 +01:00
types.go Critical operation PDB (#2830) 2025-01-29 12:41:08 +01:00
util.go Add cluster_labels and annotations to logical backup CronJob and Jobs (#3085) 2026-06-10 18:18:54 +02:00
util_test.go feature toggle for using maintenance windows (#3074) 2026-04-16 17:13:18 +02:00
volumes.go fix: correct 'occured' typo in error messages (#3094) 2026-05-11 11:16:37 +02:00
volumes_test.go Add support for EBS CSI Driver (#2677) 2024-12-19 12:32:09 +01:00