feat: add shared PgBouncer deployment

This commit is contained in:
Ryan Moon
2026-04-02 22:13:34 -05:00
parent ed98974c91
commit 54591c43ef
4 changed files with 107 additions and 0 deletions

51
pgbouncer/deployment.yaml Normal file
View File

@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pgbouncer
namespace: pgbouncer
spec:
replicas: 1
selector:
matchLabels:
app: pgbouncer
template:
metadata:
labels:
app: pgbouncer
spec:
containers:
- name: pgbouncer
image: pgbouncer/pgbouncer:1.23.1
ports:
- containerPort: 5432
volumeMounts:
- name: config
mountPath: /etc/pgbouncer/pgbouncer.ini
subPath: pgbouncer.ini
- name: userlist
mountPath: /etc/pgbouncer/userlist.txt
subPath: userlist.txt
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 200m
memory: 64Mi
livenessProbe:
tcpSocket:
port: 5432
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
tcpSocket:
port: 5432
initialDelaySeconds: 5
periodSeconds: 10
volumes:
- name: config
configMap:
name: pgbouncer-config
- name: userlist
secret:
secretName: pgbouncer-userlist