ordinarthur-os/deploy/k8s/api.deployment.yaml
ordinarthur bc0c15873f init
2026-04-15 16:41:19 +02:00

42 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: api
namespace: ordinarthur-os
spec:
replicas: 1
selector: { matchLabels: { app: api } }
template:
metadata: { labels: { app: api } }
spec:
containers:
- name: api
image: gitea.arthurbarre.fr/arthurbarre/ordinarthur-os-api:latest
imagePullPolicy: Always
ports: [{ containerPort: 3000 }]
envFrom:
- secretRef: { name: ordinarthur-os-secrets }
env:
- { name: NODE_ENV, value: production }
- { name: PORT, value: "3000" }
readinessProbe:
httpGet: { path: /health, port: 3000 }
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet: { path: /health, port: 3000 }
initialDelaySeconds: 15
periodSeconds: 30
resources:
requests: { cpu: 50m, memory: 128Mi }
limits: { cpu: 500m, memory: 512Mi }
---
apiVersion: v1
kind: Service
metadata:
name: api
namespace: ordinarthur-os
spec:
selector: { app: api }
ports: [{ port: 3000, targetPort: 3000 }]