add: liveness and readiness probes
This commit is contained in:
@@ -18,6 +18,27 @@ spec:
|
|||||||
image: git.fpmoz.sum.ba/petrraa/moj-servis:1.0
|
image: git.fpmoz.sum.ba/petrraa/moj-servis:1.0
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- 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? ─────────────────
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8000
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 2
|
||||||
|
failureThreshold: 2
|
||||||
|
|
||||||
envFrom: # <-- NOVO
|
envFrom: # <-- NOVO
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: moj-servis-config # <-- ConfigMap
|
name: moj-servis-config # <-- ConfigMap
|
||||||
@@ -33,9 +54,5 @@ spec:
|
|||||||
name: moj-servis-secret
|
name: moj-servis-secret
|
||||||
key: API_KEY
|
key: API_KEY
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests: { memory: "64Mi", cpu: "50m" }
|
||||||
memory: "64Mi"
|
limits: { memory: "128Mi", cpu: "200m" }
|
||||||
cpu: "50m"
|
|
||||||
limits:
|
|
||||||
memory: "128Mi"
|
|
||||||
cpu: "200m"
|
|
||||||
Reference in New Issue
Block a user