Requests are set to an explicit 0 instead of being removed, because Kubernetes defaults a missing request to the limit, which would reserve even more. Limits stay as an upper bound. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: apicore-backend
|
|
labels:
|
|
app: apicore-backend
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: apicore-backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: apicore-backend
|
|
spec:
|
|
containers:
|
|
- name: apicore-backend
|
|
image: git.encry.de/nick.rosenloecher/apicore-backend:latest
|
|
ports:
|
|
- containerPort: 3001
|
|
envFrom:
|
|
- configMapRef:
|
|
name: apicore-backend-config
|
|
- secretRef:
|
|
name: apicore-backend-secret
|
|
# Container fuehrt beim Start selbst `prisma migrate deploy` aus,
|
|
# bevor der Server Verbindungen annimmt (siehe Dockerfile CMD) -
|
|
# startupProbe gibt dafuer bis zu 5 Minuten Zeit, ohne dass
|
|
# liveness/readiness in der Zwischenzeit einen Neustart ausloesen.
|
|
startupProbe:
|
|
httpGet:
|
|
path: /health/ready
|
|
port: 3001
|
|
failureThreshold: 30
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3001
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health/ready
|
|
port: 3001
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
resources:
|
|
requests:
|
|
cpu: "0"
|
|
memory: "0"
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|