postgres-operator/pkg/cluster
Christian Rohmann 743aade45f
Use finalizers to avoid losing delete events and to ensure full resource cleanup (#941)
* Add Finalizer functions to Cluster; add/remove finalizer on Create/Delete events
* Check if clusters have a deletion timestamp and we missed that event. Run Delete() and remove finalizer when done.
* Fix nil handling when using Service from map; Remove Service, Endpoint entries from their maps - just like with Secrets
* Add handling of ResourceNotFound to all delete functions (Service, Endpoint, LogicalBackup CronJob, PDB and Secret) - this is not a real error when deleting things
* Emit events when there are issues deleting resources to the user is informed
* Depend the removal of the Finalizer on all resources being deleted successfully first. Otherwise the next sync run should let us try again
* Add config option to enable finalizers
* Removed dangling whitespace at EOL
* config.EnableFinalizers is a bool pointer

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-01-04 16:22:53 +01:00
..
__debug_bin4170763078 Populating crd labels and annotations in logical backup job pod manifest (#2456) 2024-01-04 14:03:16 +01:00
cluster.go Use finalizers to avoid losing delete events and to ensure full resource cleanup (#941) 2024-01-04 16:22:53 +01:00
cluster_test.go remove Users section from Patroni Bootstrap (#2490) 2024-01-03 16:47:21 +01:00
connection_pooler.go Add service account name in connection pooler (#2352) 2023-09-04 16:26:21 +02:00
connection_pooler_new_test.go Connection pooler for replica (#1127) 2020-11-13 14:52:21 +01:00
connection_pooler_test.go bump to v1.10.1 (#2410) 2023-09-07 22:46:26 +02:00
database.go Handle retry connect to Postgres when ping return EOF error. (#2339) 2023-08-25 17:53:18 +02:00
exec.go pick first container if postgres is not found (#1505) 2021-05-28 11:44:10 +02:00
filesystems.go reflect change in github url (#496) 2019-02-25 11:26:55 +01:00
k8sres.go Add hugepages 2Mi and 1Gi fields to ResourceDescription and pass them to the statefulset (#2311) 2024-01-04 15:59:27 +01:00
k8sres_test.go Add hugepages 2Mi and 1Gi fields to ResourceDescription and pass them to the statefulset (#2311) 2024-01-04 15:59:27 +01:00
majorversionupgrade.go Bump spilo and target version for PostgreSQL 15 (#2139) 2023-01-04 12:01:30 +01:00
pod.go in sync mode select only syncStandby as switchover candidate (#2278) 2023-04-06 12:04:55 +02:00
pod_test.go in sync mode select only syncStandby as switchover candidate (#2278) 2023-04-06 12:04:55 +02:00
resources.go Use finalizers to avoid losing delete events and to ensure full resource cleanup (#941) 2024-01-04 16:22:53 +01:00
streams.go add support for recovery section in event streams (#2421) 2023-09-19 17:15:50 +02:00
streams_test.go add support for recovery section in event streams (#2421) 2023-09-19 17:15:50 +02:00
sync.go Standby cluster promotion by changing manifest (#2472) 2024-01-04 12:33:50 +01:00
sync_test.go Standby cluster promotion by changing manifest (#2472) 2024-01-04 12:33:50 +01:00
types.go switch to policy API v1 for PDBs (#2008) 2022-10-06 09:43:17 +02:00
util.go let isSystemUsername check all system users (#2489) 2023-12-08 15:21:56 +01:00
util_test.go Bump v1.10.0 (#2299) 2023-04-20 18:21:43 +02:00
volumes.go log error why ebs volume modifying fails (#2395) 2023-08-18 13:18:35 +02:00
volumes_test.go do not call EBS api when there are no pvs (#1851) 2022-04-20 12:12:02 +02:00