From da231f43e077f3dd2427aaf19c22d8d1ebb74786 Mon Sep 17 00:00:00 2001 From: zvoneC Date: Mon, 8 Jun 2026 20:31:49 +0200 Subject: [PATCH] feat: v2 - dodan /info endpoint, update image tag 1.0 -> 2.0 --- app/main.py | 8 ++++++-- k8s/deployment.yaml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index d4f721a..1dd22b0 100644 --- a/app/main.py +++ b/app/main.py @@ -4,8 +4,12 @@ app = FastAPI() @app.get("/") def root(): - return {"message": "Pozdrav svijete!", "autor": "zvoneC"} + return {"message": "Pozdrav svijete! (v2)", "autor": "zvoneC"} @app.get("/health") def health(): - return {"status": "ok"} + return {"status": "ok", "version": "2.0"} + +@app.get("/info") +def info(): + return {"servis": "priprema-za-kolokvij", "verzija": "2.0"} diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 4caf4af..12d0c81 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: priprema-za-kolokvij - image: git.fpmoz.sum.ba/zvonec/priprema-za-kolokvij:1.0 + image: git.fpmoz.sum.ba/zvonec/priprema-za-kolokvij:2.0 ports: - containerPort: 8000 resources: