fix health endpoints

This commit is contained in:
2026-05-03 00:20:05 +02:00
parent c1196b075c
commit 683de80429
2 changed files with 42 additions and 19 deletions

View File

@@ -16,26 +16,22 @@ spec:
labels:
app: moj-servis
spec:
template:
spec:
containers:
- name: moj-servis
image: git.fpmoz.sum.ba/MartaBulic/moj-servis:1.0
image: git.fpmoz.sum.ba/martabulic/moj-servis:1.1
ports:
- containerPort: 8000
# ── Liveness: je li proces živ? ─────────────────
livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 10 # čekaj 10s nakon starta
periodSeconds: 15 # provjeri svakih 15s
timeoutSeconds: 3 # timeout odgovora
failureThreshold: 3 # 3 fail-a => restart
# ── Readiness: prima li promet? ─────────────────
initialDelaySeconds: 10
periodSeconds: 15
timeoutSeconds: 3
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
@@ -44,8 +40,11 @@ spec:
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 2
resources:
requests: { memory: "64Mi", cpu: "50m" }
limits: { memory: "128Mi", cpu: "200m" }
##
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"