Skip to content

Commit

Permalink
fix: deployment issue and add new functionlity
Browse files Browse the repository at this point in the history
Signed-off-by: amitamrutiya2210 <[email protected]>
  • Loading branch information
amitamrutiya committed Feb 19, 2024
1 parent 9635d05 commit 503dc43
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 127 deletions.
29 changes: 5 additions & 24 deletions kubernetes/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ metadata:
name: backend
namespace: study-notion
labels:
role: backend
env: demo
app: backend
spec:
replicas: 2
strategy:
Expand All @@ -15,14 +14,12 @@ spec:
maxUnavailable: 25%
selector:
matchLabels:
role: backend
app: backend
template:
metadata:
labels:
role: backend
app: backend
spec:
imagePullSecrets:
- name: ecr-registry-secret
containers:
- name: backend
resources:
Expand All @@ -32,23 +29,7 @@ spec:
requests:
cpu: "0.5"
memory: "200Mi"
envFrom:
- secretRef:
name: backend-sec
image: 339713132076.dkr.ecr.ap-south-1.amazonaws.com/study-notion-backend:latest
image: amit2210/study-notion:backend
imagePullPolicy: Always
env:
- name: MONGO_CONN_STR
value: mongodb+srv://[email protected]/StudyNotion?directConnection=true
- name: MONGO_USERNAME
valueFrom:
secretKeyRef:
name: mongo-sec
key: username
- name: MONGO_PASSWORD
valueFrom:
secretKeyRef:
name: mongo-sec
key: password
ports:
- containerPort: 8080
- containerPort: 4000
21 changes: 21 additions & 0 deletions kubernetes/backend/pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
name: backend
namespace: study-notion
labels:
app: backend
spec:
containers:
- name: backend
image: amit2210/study-notion:backend
resources:
limits:
cpu: "1"
memory: "500Mi"
requests:
cpu: "0.5"
memory: "200Mi"
imagePullPolicy: Always
ports:
- containerPort: 4000
12 changes: 7 additions & 5 deletions kubernetes/backend/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ metadata:
name: backend
namespace: study-notion
spec:
ports:
- port: 3500
protocol: TCP
type: ClusterIP
selector:
role: backend
app: backend
ports:
- protocol: TCP
port: 90
targetPort: 4000
nodePort: 30006
type: NodePort
51 changes: 0 additions & 51 deletions kubernetes/database/deployment.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions kubernetes/database/pv.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions kubernetes/database/pvc.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions kubernetes/database/secrets.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions kubernetes/database/service.yaml

This file was deleted.

0 comments on commit 503dc43

Please sign in to comment.