Files
Kubernetes-Build/postgres/templates/postgres-deploy.yaml
T
2025-03-14 17:08:22 +01:00

34 lines
739 B
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: {{ .Values.postgres.host }}
image: {{ .Values.postgres.image }}
ports:
- containerPort: 5432
envFrom:
- secretRef:
name: postgres-creds
- configMapRef:
name: postgres-config
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgredb
volumes:
- name: postgredb
persistentVolumeClaim:
claimName: postgresql-data-claim