feat: add shared PgBouncer deployment
This commit is contained in:
51
pgbouncer/deployment.yaml
Normal file
51
pgbouncer/deployment.yaml
Normal 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
|
||||
Reference in New Issue
Block a user