Skip to content

Commit ca092f9

Browse files
committed
backend still error
1 parent 51d4475 commit ca092f9

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

k8s/backend/deployment.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ kind: Deployment
44
metadata:
55
name: backend-deployment
66
namespace: oauth2-fullstack
7-
labels:
8-
app: fastapi
9-
tier: backend
107
spec:
118
replicas: 1
9+
strategy:
10+
type: RollingUpdate
1211
selector:
1312
matchLabels:
1413
app: fastapi
@@ -21,9 +20,16 @@ spec:
2120
spec:
2221
containers:
2322
- name: fastapi
23+
envFrom:
24+
- secretRef:
25+
name: fastapi
2426
image: jasonbigcow/oauth2-fastapi
2527
ports:
2628
- containerPort: 5001
27-
envFrom:
28-
- secretRef:
29-
name: fastapi
29+
resources:
30+
requests:
31+
memory: "256Mi"
32+
cpu: "50m"
33+
limits:
34+
memory: "512Mi"
35+
cpu: "100m"

k8s/backend/hpa.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
apiVersion: apps/v1
22
kind: HorizontalPodAutoscaler
33
metadata:
4-
name: fastapi
4+
name: backend-hpa
55
namespace: oauth2-fullstack
6-
labels:
7-
app: fastapi
8-
tier: backend
96
spec:
107
scaleTargetRef:
118
apiVersion: apps/v1
129
kind: Deployment
13-
name: fastapi
10+
name: backend-deployment
1411
minReplicas: 1
1512
maxReplicas: 3
1613
metrics:

k8s/backend/service.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
2-
apiVersion: fastapi/v1
1+
apiVersion: v1
32
kind: Service
43
metadata:
54
name: backend-service
65
namespace: oauth2-fullstack
7-
labels:
8-
app: fastapi
9-
tier: backend
106
spec:
7+
type: LoadBalancer
118
selector:
129
app: fastapi
1310
tier: backend

0 commit comments

Comments
 (0)