Skip to content

Commit

Permalink
fix frontend kubernetes service file
Browse files Browse the repository at this point in the history
Signed-off-by: amitamrutiya2210 <[email protected]>
  • Loading branch information
amitamrutiya committed Feb 18, 2024
1 parent d162409 commit 9635d05
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 32 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ start-server:
start-client:
$(call run_in_dir,frontend,npm run dev)

dev: start-server start-client
dev:
@((make start-server &) & (make start-client &))

lint-server:
$(call run_in_dir,backend,npm run format)
Expand Down
42 changes: 16 additions & 26 deletions kubernetes/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
name: frontend
namespace: study-notion
labels:
role: frontend
env: demo
app: frontend

spec:
replicas: 2
strategy:
Expand All @@ -15,32 +15,22 @@ spec:
maxUnavailable: 25%
selector:
matchLabels:
role: frontend
app: frontend
template:
metadata:
labels:
role: frontend
app: frontend
spec:
imagePullSecrets:
- name: ecr-registry-secret
containers:
- name: frontend
image: 339713132076.dkr.ecr.ap-south-1.amazonaws.com/study-notion-frontend:latest
resources:
limits:
cpu: "1"
memory: "500Mi"
requests:
cpu: "0.5"
memory: "200Mi"
imagePullPolicy: Always
env:
- name: VITE_REACT_APP_BASE_URL
value: "https://study-notion-n7gh.onrender.com/api/v1"
- name: VITE_RAZORPAY_KEY
valueFrom:
secretKeyRef:
name: frontend-sec
key: vite_razorpay_key
ports:
- containerPort: 3000
- name: frontend
image: amit2210/study-notion:frontend
resources:
limits:
cpu: "1"
memory: "500Mi"
requests:
cpu: "0.5"
memory: "200Mi"
imagePullPolicy: Always
ports:
- containerPort: 3000
21 changes: 21 additions & 0 deletions kubernetes/frontend/pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
name: frontend
namespace: study-notion
labels:
app: frontend
spec:
containers:
- name: frontend
image: amit2210/study-notion:frontend
resources:
limits:
cpu: "1"
memory: "500Mi"
requests:
cpu: "0.5"
memory: "200Mi"
imagePullPolicy: Always
ports:
- containerPort: 3000
12 changes: 7 additions & 5 deletions kubernetes/frontend/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ metadata:
name: frontend
namespace: study-notion
spec:
ports:
- port: 3000
protocol: TCP
type: ClusterIP
selector:
role: frontend
app: frontend
ports:
- protocol: TCP
port: 80
targetPort: 3000
nodePort: 30009
type: NodePort

0 comments on commit 9635d05

Please sign in to comment.