Dodane probe i env varijable
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user