Repository navigation
fix: publish the load balancer address when PgBouncer is exposed - #48
Open
olucasandrade wants to merge 1 commit into
Open
olucasandrade wants to merge 1 commit into
olucasandrade wants to merge 1 commit into
Conversation
The connection host came from the user secret's pgbouncer-host, which is always the in-cluster Service name. When PgBouncer is a LoadBalancer, use the operator's status.host, rewrite the URI host to match, and stay Provisioning until the load balancer has an address. Fixes openeverest#46 Signed-off-by: Lucas Andrade <lafdesouza2002@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #46
Summary
The connection host came from the user secret's
pgbouncer-host, which is always the in-cluster Service name, sostatus.hostwas never used. A client outside the cluster got an unresolvable host even with PgBouncer as a LoadBalancer.What changed
spec.proxy.pgBouncer.expose.typeisLoadBalancer,Hostis the operator'sstatus.hostand the URI host is rewritten to match (port, credentials, path and query kept).waiting for the pgbouncer load balancer address.Verification
go vet ./internal/...andgo test ./internal/provider: pass.Not verified
Statushas no test; the repo has noStatustests to extend.golangci-lintnot run.