Files
todo/deploy/k8s/base/deployment.yaml
Mayne0213 9e18f4a0d3 CHORE(app): reduce replicas to 1
- Scale down deployment replicas
- Optimize resource usage
2025-12-30 20:10:59 +09:00

58 lines
1.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-app
labels:
app: todo-app
spec:
replicas: 1
selector:
matchLabels:
app: todo-app
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
revisionHistoryLimit: 1
template:
metadata:
labels:
app: todo-app
spec:
containers:
- name: todo-app
image: ghcr.io/mayne0213/todo:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
protocol: TCP
env:
- name: NODE_ENV
value: production
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: todo-secrets
key: database-url
resources:
requests:
memory: "100Mi"
cpu: "50m"
limits:
memory: "200Mi"
livenessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
restartPolicy: Always