postgres-operator/pkg/controller
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
..
controller.go removing inner goroutine in cluster.Switchover (#1876) 2022-05-17 18:10:39 +02:00
logs_and_api.go deprecate ClusterName field of Postgresql type and remove team from REST endpoints (#2015) 2022-08-29 15:00:25 +02:00
node.go End 2 End tests speedup (#1180) 2020-10-28 10:04:33 +01:00
node_test.go diff SecurityContext of containers (#1255) 2020-12-15 10:06:53 +01:00
operator_config.go Use finalizers to avoid losing delete events and to ensure full resource cleanup (#941) 2024-01-04 16:22:53 +01:00
pod.go Move operator to go 1.14 (#882) 2020-03-30 15:50:17 +02:00
postgresql.go Use finalizers to avoid losing delete events and to ensure full resource cleanup (#941) 2024-01-04 16:22:53 +01:00
postgresql_test.go allow delete only if annotations meet configured criteria (#1069) 2020-08-13 16:36:22 +02:00
types.go Bootstrapped databases with best practice role setup (#843) 2020-04-29 10:56:06 +02:00
util.go Fix potential panic (#2289) 2023-04-17 14:34:18 +02:00
util_test.go Initialize arrays of errors / error messages + minor refactoring (#1701) 2021-11-29 12:49:12 +01:00