feat(pooler): create Secret and use pooler address in JDBC URL #665
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.
What the Issue Is
Currently, when enabling the pooler from the Helm chart (
values.yaml
), the pooler is created successfully, but the generated Secret is not updated to use the pooler endpoint.Instead, the Secret continues to expose the default PostgreSQL connection URL (
postgresql://...
) from the cluster.This means applications cannot automatically connect via the pooler, defeating the purpose of enabling it through the chart.
This behavior has been raised in related issues:
How the Solution Works
Since handling this directly in the operator is more complex and requires deeper architectural changes, this PR provides a Helm chart level solution.
When
pooler.enabled = true
invalues.yaml
:A new Secret is generated for the pooler containing:
The Secret is mapped to the cluster, ensuring workloads can connect using the pooler endpoint instead of the PostgreSQL endpoint.
This approach provides a simpler and more flexible way to expose pooler connectivity without waiting for operator level changes.
Current Scope
rw
pooler).Future Improvements (possible next steps)
ro
pooler or custom poolers).