Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| 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. |
Expand Down
2 changes: 1 addition & 1 deletion charts/cluster/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| 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. |
Expand Down
4 changes: 4 additions & 0 deletions charts/cluster/templates/pooler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ spec:
template:
{{- . | toYaml | nindent 4 }}
{{- end }}
{{- with .serviceTemplate }}
serviceTemplate:
{{- . | toYaml | nindent 4 }}
{{- end }}
{{- end }}
27 changes: 27 additions & 0 deletions charts/cluster/test/pooler/01-pooler_cluster-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ metadata:
status:
readyReplicas: 2
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pooler-cluster-pooler-lb-rw
status:
readyReplicas: 2
---
apiVersion: postgresql.cnpg.io/v1
kind: Pooler
metadata:
Expand All @@ -35,3 +42,23 @@ spec:
pgbouncer:
poolMode: session
type: ro
---
apiVersion: postgresql.cnpg.io/v1
kind: Pooler
metadata:
name: pooler-cluster-pooler-lb-rw
spec:
cluster:
name: pooler-cluster
instances: 2
pgbouncer:
poolMode: transaction
type: rw
serviceTemplate:
metadata:
annotations:
metallb.universe.tf/address-pool: loadbalanced
metallb.universe.tf/allow-shared-ip: loadbalanced
metallb.universe.tf/ip-allocated-from-pool: loadbalanced
spec:
type: LoadBalancer
12 changes: 12 additions & 0 deletions charts/cluster/test/pooler/01-pooler_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,15 @@ poolers:
- name: ro
type: ro
instances: 2
- name: lb-rw
type: rw
instances: 2
poolMode: transaction
serviceTemplate:
metadata:
annotations:
metallb.universe.tf/address-pool: loadbalanced
metallb.universe.tf/allow-shared-ip: loadbalanced
metallb.universe.tf/ip-allocated-from-pool: loadbalanced
spec:
type: LoadBalancer
2 changes: 1 addition & 1 deletion charts/cluster/test/pooler/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
timeouts:
apply: 1s
assert: 20s
assert: 2m
cleanup: 30s
steps:
- name: Install the non-default configuration cluster
Expand Down
6 changes: 6 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ poolers: []
# # -- Custom PgBouncer deployment template.
# # Use to override image, specify resources, etc.
# template: {}
# # -- Custom PgBouncer service template.
# # Use to override service type, annotations, etc.
# serviceTemplate: {}
# -
# # -- Pooler name
# name: ro
Expand All @@ -502,3 +505,6 @@ poolers: []
# # -- Custom PgBouncer deployment template.
# # Use to override image, specify resources, etc.
# template: {}
# # -- Custom PgBouncer service template.
# # Use to override service type, annotations, etc.
# serviceTemplate: {}