refactor: Update API deployment and service names to match component name change

This commit is contained in:
2024-08-13 21:20:11 +08:00
parent 1f0b71fab1
commit d9498c66c7
4 changed files with 81 additions and 25 deletions
+15 -14
View File
@@ -1,27 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-deployment
name: api-deployment
spec:
replicas: 1
selector:
matchLabels:
component: postgres
component: api
template:
metadata:
labels:
component: postgres
component: api
spec:
volumes:
- name: postgres-storage
persistentVolumeClaim:
claimName: database-persistent-volume-claim
containers:
- name: postgres
image: postgres
- name: api
image: uxioandrade/tutorial-api
ports:
- containerPort: 5432
volumeMounts:
- name: postgres-storage
mountPath: /var/lib/postgresql/data
subPath: postgres
- containerPort: 8080
env:
- name: PG_HOST
value: postgres-cluster-ip-service
- name: PG_PORT
value: '5432'
- name: PGUSER
value: postgres
- name: PGDATABASE
value: postgres