Dodane probe i env varijable
Some checks failed
CI/CD Pipeline / build (push) Successful in 1m47s
CI/CD Pipeline / deploy (push) Failing after 43s

This commit is contained in:
2026-05-02 17:41:15 +02:00
parent 172adb1eda
commit 9c6daaa6b6

View File

@@ -20,6 +20,36 @@ spec:
image: git.fpmoz.sum.ba/sz11zs/hello-cicd:latest
ports:
- containerPort: 8000
# 1. POVEZIVANJE S CONFIGMAP I SECRET (iz prethodnog koraka)
env:
- name: APP_VERSION
value: "latest"
valueFrom:
configMapKeyRef:
name: hello-cicd-config
key: APP_VERSION
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: hello-cicd-secret
key: password
# 2. LIVENESS PROBE (je li proces živ?)
livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 10 # čekaj 10s nakon starta
periodSeconds: 15 # provjeri svakih 15s[cite: 1]
timeoutSeconds: 3 # timeout odgovora[cite: 1]
failureThreshold: 3 # 3 fail-a => restart[cite: 1]
# 3. READINESS PROBE (prima li promet?)[cite: 1]
readinessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 2