pokeapi/Resources/k8s/kustomize/base/deployments/postgres-deployment.yaml
Alessandro Pezzè 1cbb78f27e feat: update
2023-01-09 16:11:23 +01:00

41 lines
1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: postgresql
labels:
component: postgresql
spec:
replicas: 1
selector:
matchLabels:
component: postgresql
template:
metadata:
labels:
component: postgresql
spec:
containers:
- name: postgresql
image: postgres:15.1-alpine
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: ash
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-env-secret
key: POSTGRES_PASSWORD
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
- name: POSTGRES_DB
value: pokeapi
resources: {}
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgres-claim0
volumes:
- name: postgres-claim0
persistentVolumeClaim:
claimName: postgres-claim0