add: liveness and readiness probes
This commit is contained in:
@@ -18,20 +18,43 @@ spec:
|
|||||||
image: git.fpmoz.sum.ba/leonarda11/moj-servis:1.0
|
image: git.fpmoz.sum.ba/leonarda11/moj-servis:1.0
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
envFrom: # <-- NOVO
|
|
||||||
|
# ── Liveness
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8000
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 15
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 3
|
||||||
|
|
||||||
|
# ── Readiness
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8000
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 2
|
||||||
|
failureThreshold: 2
|
||||||
|
|
||||||
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: moj-servis-config # <-- ConfigMap
|
name: moj-servis-config
|
||||||
env: # <-- NOVO
|
|
||||||
|
env:
|
||||||
- name: DB_PASSWORD
|
- name: DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: moj-servis-secret # <-- Secret
|
name: moj-servis-secret
|
||||||
key: DB_PASSWORD
|
key: DB_PASSWORD
|
||||||
- name: API_KEY
|
- name: API_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: moj-servis-secret
|
name: moj-servis-secret
|
||||||
key: API_KEY
|
key: API_KEY
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "64Mi"
|
memory: "64Mi"
|
||||||
|
|||||||
Reference in New Issue
Block a user