diff --git a/k8s/moj-servis/deployment.yaml b/k8s/moj-servis/deployment.yaml index a1b869e..70a9b7e 100644 --- a/k8s/moj-servis/deployment.yaml +++ b/k8s/moj-servis/deployment.yaml @@ -18,24 +18,47 @@ spec: image: git.fpmoz.sum.ba/leonarda11/moj-servis:1.0 ports: - 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: - name: moj-servis-config # <-- ConfigMap - env: # <-- NOVO + name: moj-servis-config + + env: - name: DB_PASSWORD valueFrom: secretKeyRef: - name: moj-servis-secret # <-- Secret + name: moj-servis-secret key: DB_PASSWORD - name: API_KEY valueFrom: secretKeyRef: name: moj-servis-secret key: API_KEY + resources: requests: memory: "64Mi" cpu: "50m" limits: memory: "128Mi" - cpu: "200m" + cpu: "200m" \ No newline at end of file