Skip to content

Commit c7ec7ab

Browse files
committed
added kubernetes files
1 parent f7c0383 commit c7ec7ab

3 files changed

Lines changed: 52 additions & 2 deletions

File tree

api-server/app/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ async def lifespan(app: FastAPI):
5959
app.add_middleware(UnhandledExceptionsMiddleware)
6060

6161

62-
63-
@app.get("/health-check")
62+
@app.get("/health")
6463
def health() -> dict:
6564
return {"message": "OK"}
6665

k8s/deployment.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: exosphere-api-server
5+
spec:
6+
replicas: 2
7+
selector:
8+
matchLabels:
9+
app: exosphere-api-server
10+
template:
11+
metadata:
12+
labels:
13+
app: exosphere-api-server
14+
spec:
15+
containers:
16+
- name: exosphere-api-server
17+
image: ghcr.io/niveditjain/exosphere-api-server:latest
18+
ports:
19+
- containerPort: 8000
20+
envFrom:
21+
- secretRef:
22+
name: exosphere-api-server-secrets
23+
resources:
24+
requests:
25+
memory: "256Mi"
26+
cpu: "250m"
27+
limits:
28+
memory: "512Mi"
29+
cpu: "500m"
30+
readinessProbe:
31+
httpGet:
32+
path: /health
33+
port: 8000
34+
initialDelaySeconds: 5
35+
periodSeconds: 10
36+
livenessProbe:
37+
httpGet:
38+
path: /health
39+
port: 8000
40+
initialDelaySeconds: 5
41+
periodSeconds: 10

k8s/service.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: exosphere-api-server
5+
spec:
6+
selector:
7+
app: exosphere-api-server
8+
ports:
9+
- port: 8000
10+
targetPort: 8000

0 commit comments

Comments
 (0)