configure pgbouncer
This commit is contained in:
parent
32586a2244
commit
b038191aae
|
@ -44,6 +44,51 @@ spec:
|
|||
- name: PGBOUNCER_DATABASE
|
||||
value: nocodelytics_production
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pgbouncer-exporter
|
||||
namespace: databases
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pgbouncer-exporter
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pgbouncer-exporter
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9127"
|
||||
spec:
|
||||
containers:
|
||||
- name: pgbouncer-exporter
|
||||
image: prometheuscommunity/pgbouncer-exporter:latest
|
||||
ports:
|
||||
- containerPort: 9127
|
||||
args:
|
||||
- --pgBouncer.connectionString=postgres://postgres:$(POSTGRES_PASSWORD)@pgbouncer.databases:5432/pgbouncer?sslmode=disable
|
||||
- --web.listen-address=:9127
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: secrets
|
||||
key: POSTGRES_PASSWORD
|
||||
- name: PGBOUNCER_DEFAULT_POOL_SIZE
|
||||
value: "20"
|
||||
- name: PGBOUNCER_MAX_CLIENT_CONN
|
||||
value: "500"
|
||||
- name: PGBOUNCER_SERVER_IDLE_TIMEOUT
|
||||
value: "60"
|
||||
- name: PGBOUNCER_POOL_MODE
|
||||
value: transaction
|
||||
- name: PGBOUNCER_RESERVE_POOL_SIZE
|
||||
value: "10"
|
||||
- name: PGBOUNCER_RESERVE_POOL_TIMEOUT
|
||||
value: "5"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
|
|
Loading…
Reference in New Issue