-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinventory-service-db-deploy.yaml
More file actions
39 lines (39 loc) · 1020 Bytes
/
inventory-service-db-deploy.yaml
File metadata and controls
39 lines (39 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
apiVersion: apps/v1
kind: Deployment
metadata:
name: inventory-service-db-deploy
spec:
replicas: 1
selector:
matchLabels:
app: inventory-service-db
template:
metadata:
labels:
app: inventory-service-db
spec:
containers:
- name: postgres
image: postgres:16-alpine
ports:
- containerPort: 5432
env:
- name: POSTGRES_DB
value: inventory
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: db-secrets
key: POSTGRES_USER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: db-secrets
key: POSTGRES_PASSWORD
volumeMounts:
- name: postgres-volume
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-volume
persistentVolumeClaim:
claimName: inventory-service-pvc