Skip to content

Commit

Permalink
Changed defaults. Explicitly setting poolMode and type
Browse files Browse the repository at this point in the history
Signed-off-by: Itay Grudev <[email protected]>
  • Loading branch information
itay-grudev committed Oct 15, 2024
1 parent ab02f03 commit 0fb3512
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions charts/cluster/templates/pooler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,27 @@ spec:
cluster:
name: {{ include "cluster.fullname" $ }}
instances: {{ .instances }}
type: {{ .type }}
type: {{ default "rw" .type }}
pgbouncer:
poolMode: {{ .poolMode }}
poolMode: {{ default "session" .poolMode }}
{{- with .parameters }}
parameters:
{{- toYaml .parameters | nindent 6 }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{ with .monitoring }}
monitoring:
{{- if not (empty .monitoring.podMonitor) }}
enablePodMonitor: {{ and .monitoring.enabled .monitoring.podMonitor.enabled }}
{{- if not (empty .monitoring.podMonitor.relabelings) }}
{{- with .monitoring.podMonitor.relabelings }}
podMonitorRelabelings:
{{- toYaml . | nindent 6 }}
{{ end }}
{{- end }}
{{- if not (empty .monitoring.podMonitor.metricRelabelings) }}
{{- with .monitoring.podMonitor.metricRelabelings }}
podMonitorMetricRelabelings:
{{- toYaml . | nindent 6 }}
{{ end }}
{{- end }}
{{- end }}
{{- end }}
{{- with .template }}
template:
{{- . | toYaml | nindent 4 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/cluster/test/pooler/01-pooler_cluster-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
name: pooler-cluster
instances: 2
pgbouncer:
poolMode: transaction
poolMode: session
type: rw
---
apiVersion: postgresql.cnpg.io/v1
Expand All @@ -33,5 +33,5 @@ spec:
name: pooler-cluster
instances: 2
pgbouncer:
poolMode: transaction
poolMode: session
type: ro

0 comments on commit 0fb3512

Please sign in to comment.