Skip to content

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Mar 14, 2022

This PR goes back to always sync pooler components, since updates on services are now supported with #1799.

Error handling in syncConnectionPooler is wrong. The GET request to find the pooler service defines err for the if block, but the latter if !k8sutil.ResourceNotFound(err) check is using the last state of err from the surrounding scope. In case the postgresql resource has annotations defined, err likely has the value <nil> from updating the pooler deployment. If not, err would still be NotFound from the deployment check, hence if !k8sutil.ResourceNotFound(err) check works as expected.

The PR fixes another minor issue: A standby cluster could not have a connection pooler enabled because the operator would try to install the pooler user an schema in the DB cluster, although they should already be present (if the source clusters uses the pooler, too). Now, pooler installation is skipped for standby clusters.

@FxKu FxKu added this to the 1.8 milestone Mar 14, 2022
@FxKu FxKu added the bug label Mar 15, 2022
@Jan-M Jan-M added the zalando label Mar 17, 2022
@Jan-M
Copy link
Member

Jan-M commented Mar 17, 2022

👍

1 similar comment
@FxKu
Copy link
Member Author

FxKu commented Mar 17, 2022

👍

@FxKu FxKu merged commit 6ba05fe into master Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants