feat(cluster): wire serviceTemplate through the Pooler template#948
Open
philippemnoel wants to merge 1 commit into
Open
feat(cluster): wire serviceTemplate through the Pooler template#948philippemnoel wants to merge 1 commit into
philippemnoel wants to merge 1 commit into
Conversation
The Pooler template only passed through `template` (the pgbouncer deployment), so a pooler's Service could not be customized from chart values even though the README already advertised `poolers[].serviceTemplate`. Pass `serviceTemplate` through to the CNPG Pooler spec so the pooler Service can set its type (for example LoadBalancer), annotations, and labels. Document the field in values.yaml, fix the mislabeled README row, and extend the pooler chainsaw test to render and assert it. Signed-off-by: Philippe Noël <philippemnoel@gmail.com>
philippemnoel
added a commit
to paradedb/charts
that referenced
this pull request
Jul 13, 2026
The Pooler template only exposed `template` (the pgbouncer deployment), so a pooler's Service could not be customized via chart values even though the README already listed `poolers[].serviceTemplate`. This adds the `serviceTemplate` passthrough, matching CNPG's Pooler spec, so the pooler Service can be made a LoadBalancer (type + AWS NLB annotations). Documents the field in values.yaml, fixes the mislabeled README row, and asserts it in the pooler test. This unblocks values-driven PrivateLink in paradedb/cloud, where every customer cluster is expressed as chart values rather than out-of-band Terraform Services. Mirrors the upstream change proposed in cloudnative-pg#948. Claude-Session: https://claude.ai/code/session_01RVg7zztPzKfJvEGwo12dUb
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.
What
Pooler.spec.serviceTemplatethrough theclusterchart viapoolers[].serviceTemplate.values.yamland fixes the README row, which already listedpoolers[].serviceTemplateas aServiceTemplateSpeceven though the template never rendered it.poolerchainsaw test to render and assert the new block.Why
The Pooler template only passed through
template(the PgBouncer deploymentPodTemplateSpec), so there was no way to customize the Service the pooler creates without bypassing the chart. CloudNativePG exposesPooler.spec.serviceTemplatefor exactly this, and the chart's README already advertisedpoolers[].serviceTemplate, so the field was documented but non-functional.Setting
serviceTemplatelets chart users control the pooler Service type, annotations, and labels, for example to front the pooler with an internal NLB for AWS PrivateLink, without dropping down to hand-writtenkubernetes_serviceresources alongside the chart.Backwards compatibility
poolers[].serviceTemplateis unset by default, and the template uses{{- with ... }}, so the block is omitted entirely when not provided. Existing poolers render identically.Tests
helm lint charts/clusterhelm template test charts/cluster --show-only templates/pooler.yaml(noserviceTemplaterendered by default)helm template test charts/cluster --show-only templates/pooler.yaml --values charts/cluster/test/pooler/01-pooler_cluster.yaml(rendersserviceTemplateon the rw pooler, omits it on the ro pooler)poolerchainsaw test now asserts the renderedserviceTemplateblock on the rw Pooler.