Files
helloo-cicdd/k8s/moj-servis/deployment.yaml
Marijanela ff7c470c37
All checks were successful
CI/CD Pipeline / build (push) Successful in 1m31s
CI/CD Pipeline / deploy (push) Successful in 2m5s
povećanje cpua i memorije
2026-05-02 14:50:51 +02:00

51 lines
1.4 KiB
YAML

# k8s/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: helloo-cicdd
namespace: student-marijanela218
spec:
replicas: 3
selector:
matchLabels:
app: helloo-cicdd
template:
metadata:
labels:
app: helloo-cicdd
spec:
imagePullSecrets:
- name: gitea-creds
containers:
- name: helloo-cicdd
image: git.fpmoz.sum.ba/marijanela218/helloo-cicdd:latest
imagePullPolicy: Always
ports:
- 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
env:
- name: APP_VERSION
value: "latest"
resources:
requests: {cpu: 100m, memory: 128Mi}
limits: {cpu: 500m, memory: 256Mi}