bez ispravljeni koda
Some checks failed
CI/CD Pipeline popravak / build (push) Successful in 1m31s
CI/CD Pipeline popravak / deploy (push) Failing after 1m5s

This commit is contained in:
2026-05-03 11:39:58 +02:00
parent 994fd12a47
commit c5ed7929dd
2 changed files with 18 additions and 49 deletions

View File

@@ -1,58 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: moj-servis
name: hello-cicd
namespace: student-sz11zs
spec:
replicas: 1
selector:
matchLabels:
app: moj-servis
app: hello-cicd
template:
metadata:
labels:
app: moj-servis
app: hello-cicd
spec:
imagePullSecrets:
- name: gitea-creds
containers:
- name: moj-servis
image: git.fpmoz.sum.ba/sz11zs/moj-servis:1.1
- name: hello-cicd
image: git.fpmoz.sum.ba/sz11zs/hello-cicd:latest
ports:
- containerPort: 8000
# 1. POVEZIVANJE S OKOLINSKIM VARIJABLAMA (Secret i ConfigMap)
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: moj-servis-secret
key: DB_PASSWORD
- name: API_KEY
valueFrom:
secretKeyRef:
name: moj-servis-secret
key: API_KEY
envFrom:
- configMapRef:
name: moj-servis-config
# 2. LIVENESS PROBE: Dodano za Korak 1.4
livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 10
periodSeconds: 15
timeoutSeconds: 3
failureThreshold: 3
# 3. READINESS PROBE: Dodano za Korak 1.4
readinessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 2
- name: APP_VERSION
value: "latest"
resources:
requests: {cpu: 50m, memory: 64Mi}
limits: {cpu: 200m, memory: 128Mi}