mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 10:08:40 +02:00
add unit test and documentation for finalizers (#2509)
* add unit test and documentation for finalizers * error msg with lower case and cover sync case * try to avoid adding json-patch dependency * use Update to remove finalizer * changing status and finalizer during create * do not call Delete() twice
This commit is contained in:
@@ -610,7 +610,7 @@ func (c *Cluster) deleteConnectionPooler(role PostgresRole) (err error) {
|
||||
Delete(context.TODO(), deployment.Name, options)
|
||||
|
||||
if k8sutil.ResourceNotFound(err) {
|
||||
c.logger.Debugf("connection pooler deployment was already deleted")
|
||||
c.logger.Debugf("connection pooler deployment %s for role %s has already been deleted", deployment.Name, role)
|
||||
} else if err != nil {
|
||||
return fmt.Errorf("could not delete connection pooler deployment: %v", err)
|
||||
}
|
||||
@@ -629,7 +629,7 @@ func (c *Cluster) deleteConnectionPooler(role PostgresRole) (err error) {
|
||||
Delete(context.TODO(), service.Name, options)
|
||||
|
||||
if k8sutil.ResourceNotFound(err) {
|
||||
c.logger.Debugf("connection pooler service was already deleted")
|
||||
c.logger.Debugf("connection pooler service %s for role %s has already been already deleted", service.Name, role)
|
||||
} else if err != nil {
|
||||
return fmt.Errorf("could not delete connection pooler service: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user