Add postgres app.

This commit is contained in:
2025-05-18 15:26:24 -07:00
parent 9ec2c6824f
commit 2d3fb6068d
7 changed files with 115 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-deployment
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:15
ports:
- containerPort: 5432
envFrom:
- secretRef:
name: secrets
- configMapRef:
name: config
env:
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
- name: TZ
valueFrom:
configMapKeyRef:
name: config
key: TZ
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: postgres-pvc