Skip to content

Commit 8fb96ef

Browse files
committed
Update k8s resources for Video Service
1 parent f3ab584 commit 8fb96ef

File tree

2 files changed

+38
-45
lines changed

2 files changed

+38
-45
lines changed

database.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: video-mongo-deployment
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: mongo
10+
template:
11+
metadata:
12+
labels:
13+
app: mongo
14+
spec:
15+
containers:
16+
- name: mongo
17+
image: mongo:latest
18+
ports:
19+
- containerPort: 27017
20+
env:
21+
- name: MONGO_INITDB_DATABASE
22+
value: video-service
23+
resources:
24+
limits:
25+
memory: 512Mi
26+
cpu: "1"
27+
---
28+
apiVersion: v1
29+
kind: Service
30+
metadata:
31+
name: video-mongo-service
32+
spec:
33+
selector:
34+
app: mongo
35+
ports:
36+
- protocol: TCP
37+
port: 27017
38+
targetPort: 27017

resources.yaml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,3 @@
1-
apiVersion: apps/v1
2-
kind: Deployment
3-
metadata:
4-
name: video-mongo-deployment
5-
spec:
6-
replicas: 1
7-
selector:
8-
matchLabels:
9-
app: mongo
10-
template:
11-
metadata:
12-
labels:
13-
app: mongo
14-
spec:
15-
containers:
16-
- name: mongo
17-
image: mongo:latest
18-
ports:
19-
- containerPort: 27017
20-
env:
21-
- name: MONGO_INITDB_DATABASE
22-
value: video-service
23-
resources:
24-
requests:
25-
memory: 128Mi
26-
cpu: "0.2"
27-
limits:
28-
memory: 256Mi
29-
cpu: "1"
30-
---
31-
apiVersion: v1
32-
kind: Service
33-
metadata:
34-
name: video-mongo-service
35-
spec:
36-
selector:
37-
app: mongo
38-
ports:
39-
- protocol: TCP
40-
port: 27017
41-
targetPort: 27017
42-
431
---
442
apiVersion: apps/v1
453
kind: Deployment
@@ -66,9 +24,6 @@ spec:
6624
- name: SPRING_DATA_MONGODB_URI
6725
value: mongodb://video-mongo-service:27017/video-service
6826
resources:
69-
requests:
70-
memory: 256Mi
71-
cpu: "0.4"
7227
limits:
7328
memory: 512Mi
7429
cpu: "1"

0 commit comments

Comments
 (0)