diff --git a/charts/cluster/README.md b/charts/cluster/README.md index af64bcdaef..d465cb4625 100644 --- a/charts/cluster/README.md +++ b/charts/cluster/README.md @@ -340,7 +340,7 @@ Kubernetes: `>=1.29.0-0` | poolers[].authQuery | string | `{}` | The credentials of the user that need to be used for the authentication query. | | poolers[].parameters | map[string]string | `{}` | Additional parameters to be passed to PgBouncer - please check the CNPG documentation for a list of options you can configure | | poolers[].template | [PodTemplateSpec][PodTemplateSpec] | `{}` | The template of the Pod to be created | -| poolers[].template | [ServiceTemplateSpec][ServiceTemplateSpec] | `{}` | Template for the Service to be created | +| poolers[].serviceTemplate | [ServiceTemplateSpec][ServiceTemplateSpec] | `{}` | Template for the Service to be created | | poolers[].pg_hba | []string | `{}` | PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file) | | poolers[].monitoring.enabled | bool | `false` | Whether to enable monitoring for the Pooler. | | poolers[].monitoring.podMonitor.enabled | bool | `true` | Create a podMonitor for the Pooler. | diff --git a/charts/cluster/README.md.gotmpl b/charts/cluster/README.md.gotmpl index 11f874c38b..90ab5a1867 100644 --- a/charts/cluster/README.md.gotmpl +++ b/charts/cluster/README.md.gotmpl @@ -131,7 +131,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentati | poolers[].authQuery | string | `{}` | The credentials of the user that need to be used for the authentication query. | | poolers[].parameters | map[string]string | `{}` | Additional parameters to be passed to PgBouncer - please check the CNPG documentation for a list of options you can configure | | poolers[].template | [PodTemplateSpec][PodTemplateSpec] | `{}` | The template of the Pod to be created | -| poolers[].template | [ServiceTemplateSpec][ServiceTemplateSpec] | `{}` | Template for the Service to be created | +| poolers[].serviceTemplate | [ServiceTemplateSpec][ServiceTemplateSpec] | `{}` | Template for the Service to be created | | poolers[].pg_hba | []string | `{}` | PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file) | | poolers[].monitoring.enabled | bool | `false` | Whether to enable monitoring for the Pooler. | | poolers[].monitoring.podMonitor.enabled | bool | `true` | Create a podMonitor for the Pooler. | diff --git a/charts/cluster/templates/pooler.yaml b/charts/cluster/templates/pooler.yaml index b73f7748c7..e0ccc6a669 100644 --- a/charts/cluster/templates/pooler.yaml +++ b/charts/cluster/templates/pooler.yaml @@ -32,4 +32,8 @@ spec: template: {{- . | toYaml | nindent 4 }} {{- end }} + {{- with .serviceTemplate }} + serviceTemplate: + {{- . | toYaml | nindent 4 }} + {{- end }} {{- end }} diff --git a/charts/cluster/values.yaml b/charts/cluster/values.yaml index 2c7e8b5c15..90e636577d 100644 --- a/charts/cluster/values.yaml +++ b/charts/cluster/values.yaml @@ -644,6 +644,9 @@ poolers: [] # # -- Custom PgBouncer deployment template. # # Use to override image, specify resources, etc. # template: {} + # # -- Custom PgBouncer service template. + # # Use to override pooler service annotations, type, etc. + # serviceTemplate: {} # - # # -- Pooler name # name: ro @@ -675,3 +678,6 @@ poolers: [] # # -- Custom PgBouncer deployment template. # # Use to override image, specify resources, etc. # template: {} + # # -- Custom PgBouncer service template. + # # Use to override pooler service annotations, type, etc. + # serviceTemplate: {}