postgres-operator/pkg/util
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
..
config Use finalizers to avoid losing delete events and to ensure full resource cleanup (#941) 2024-01-04 16:22:53 +01:00
constants add support for recovery section in event streams (#2421) 2023-09-19 17:15:50 +02:00
filesystems Fix golint warnings 2017-08-01 16:08:56 +02:00
httpclient use relative path instead of $PWD for go:generate (for go 1.17 compatibility) (#1615) 2021-09-14 14:54:41 +02:00
k8sutil check pg version (#2342) 2023-08-10 18:06:17 +02:00
nicediff End 2 End tests speedup (#1180) 2020-10-28 10:04:33 +01:00
patroni Standby cluster promotion by changing manifest (#2472) 2024-01-04 12:33:50 +01:00
retryutil Fix typo (#965) 2020-05-12 09:20:09 +02:00
ringlog fix comments for ringlogger 2017-09-26 13:12:38 +02:00
teams add test team member (#1842) 2022-04-14 10:02:54 +02:00
users fix team member deprecation (#2072) 2022-10-11 18:02:41 +02:00
volumes fix extraction of EBS volume id when there's no region prefix (#2351) 2023-06-12 15:18:19 +02:00
util.go Set maximum CPU and Memory requests on K8s (#1959) 2022-07-28 14:18:27 +02:00
util_test.go fix team member deprecation (#2072) 2022-10-11 18:02:41 +02:00