Skip to content

Commit efe6e22

Browse files
committed
update
1 parent bfe7fe4 commit efe6e22

File tree

3 files changed

+39
-17
lines changed

3 files changed

+39
-17
lines changed

.github/workflows/deploymentCd.yaml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Continuous Deployment for Video Service
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Continuous Integration for Video Service"]
6+
types:
7+
- completed
78

89
env:
910
PROJECT_ID: gke-project-423206
@@ -40,16 +41,6 @@ jobs:
4041
project_id: ${{ env.PROJECT_ID }}
4142
install_components: 'gke-gcloud-auth-plugin'
4243

43-
- name: Login to Docker Hub
44-
uses: docker/login-action@v1
45-
with:
46-
username: datuits
47-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
48-
49-
- name: Build and Push the docker image
50-
run: |
51-
docker build -t datuits/devops-video-service:latest .
52-
docker push datuits/devops-video-service:latest
5344

5445
- name: Set cluster context
5546
run: |

database.yaml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,40 @@ spec:
2121
- name: MONGO_INITDB_DATABASE
2222
value: video-service
2323
resources:
24-
limits:
25-
memory: 512Mi
26-
cpu: "1"
24+
limits:
25+
memory: "128Mi"
26+
cpu: "0.2"
27+
volumeMounts:
28+
- name: mongo-storage
29+
mountPath: /data/db
30+
volumes:
31+
- name: mongo-storage
32+
persistentVolumeClaim:
33+
claimName: video-mongo-pvc
34+
---
35+
apiVersion: v1
36+
kind: PersistentVolume
37+
metadata:
38+
name: video-mongo-pv
39+
spec:
40+
capacity:
41+
storage: 256Mi
42+
accessModes:
43+
- ReadWriteOnce
44+
gcePersistentDisk:
45+
pdName: video-mongo-disk
46+
fsType: ext4
47+
---
48+
apiVersion: v1
49+
kind: PersistentVolumeClaim
50+
metadata:
51+
name: video-mongo-pvc
52+
spec:
53+
accessModes:
54+
- ReadWriteOnce
55+
resources:
56+
requests:
57+
storage: 256Mi
2758
---
2859
apiVersion: v1
2960
kind: Service

resources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ spec:
3939
- protocol: TCP
4040
port: 8083
4141
targetPort: 8083
42-
type: ClusterIP
42+
type: NodePort

0 commit comments

Comments
 (0)