mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-12-04 09:09:14 +00:00
41 lines
1 KiB
YAML
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
|