2019-08-26 07:52:41 +02:00
|
|
|
apiVersion: apps/v1
|
2018-03-05 12:57:48 +01:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2019-08-26 07:52:41 +02:00
|
|
|
labels:
|
|
|
|
app: db
|
2018-03-05 12:57:48 +01:00
|
|
|
name: db
|
2018-10-09 21:51:59 +02:00
|
|
|
namespace: vote
|
2018-03-05 12:57:48 +01:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
2019-08-26 07:52:41 +02:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: db
|
2018-03-05 12:57:48 +01:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: db
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: postgres:9.4
|
2019-08-26 07:52:41 +02:00
|
|
|
name: postgres
|
2020-02-19 20:54:19 +01:00
|
|
|
env:
|
|
|
|
- name: POSTGRES_USER
|
|
|
|
value: postgres
|
|
|
|
- name: POSTGRES_PASSWORD
|
|
|
|
value: postgres
|
2019-08-26 07:52:41 +02:00
|
|
|
ports:
|
|
|
|
- containerPort: 5432
|
|
|
|
name: postgres
|
2018-03-05 12:57:48 +01:00
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /var/lib/postgresql/data
|
|
|
|
name: db-data
|
|
|
|
volumes:
|
|
|
|
- name: db-data
|
|
|
|
emptyDir: {}
|