From 198b2de5c5944c304dc88e2e4596feb32e696cc1 Mon Sep 17 00:00:00 2001 From: mirko416 Date: Tue, 23 Jun 2026 13:42:38 +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 0aaeb07..1eb01f6 100644 --- a/app/main.py +++ b/app/main.py @@ -4,8 +4,12 @@ app = FastAPI() @app.get("/") def root(): - return {"message": "Pozdrav svijete!", "autor": "mirko416"} + return {"message": "Pozdrav svijete! (v2)", "autor": "mirko416"} @app.get("/health") def health(): - return {"status": "ok"} \ No newline at end of file + 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 78d8ed5..ac85edb 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: priprema-za-kolokvij2 - image: git.fpmoz.sum.ba/mirko416/priprema-za-kolokvij2:1.0 + image: git.fpmoz.sum.ba/mirko416/priprema-za-kolokvij2:2.0 ports: - containerPort: 8000 resources: