mirror of
https://github.com/Dannecron/netology-devops.git
synced 2025-12-25 23:32:37 +03:00
homework 13.3: fix prod database deployment from homework 13.1
This commit is contained in:
@@ -48,7 +48,7 @@ metadata:
|
|||||||
app: prod-app
|
app: prod-app
|
||||||
service: database
|
service: database
|
||||||
db-kind: postgresql
|
db-kind: postgresql
|
||||||
name: testing-db
|
name: prod-db
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
@@ -74,7 +74,9 @@ spec:
|
|||||||
image: postgres:13-alpine # Sets Image
|
image: postgres:13-alpine # Sets Image
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5432 # Exposes container port
|
- name: postgresql
|
||||||
|
containerPort: 5432
|
||||||
|
protocol: TCP
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: postgres-config
|
name: postgres-config
|
||||||
@@ -85,3 +87,19 @@ spec:
|
|||||||
- name: postgredb
|
- name: postgredb
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: postgres-pv-claim
|
claimName: postgres-pv-claim
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: postgres
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: postgresql
|
||||||
|
port: 5432
|
||||||
|
targetPort: postgresql
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
service: database
|
||||||
|
db-kind: postgresql
|
||||||
|
|||||||
Reference in New Issue
Block a user