Compare commits

..

2 Commits

Author SHA1 Message Date
Ivan Filipovic
4ccb0dccaa add: configmap, ingress + update deployment with env refs 2026-04-07 11:37:52 +02:00
Ivan Filipovic
33c4f5e6f7 add: configmap, ingress + update deployment with env refs 2026-04-07 11:35:20 +02:00
3 changed files with 50 additions and 0 deletions

View File

@@ -6,6 +6,14 @@ app = FastAPI()
def root():
return {"message": "Pozdrav svijete"}
@app.get("/info")
def info():
return {
"python": platform.python_version(),
"verzija": "2.0"
}
@app.get("/health")
def health():

41
deployment.yaml Normal file
View File

@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: moj-servis
namespace: student-ivanivso7
spec:
replicas: 1
selector:
matchLabels:
app: moj-servis
template:
metadata:
labels:
app: moj-servis
spec:
containers:
- name: moj-servis
image: git.fpmoz.sum.ba/ivanivso7/moj-servis:1.0
ports:
- containerPort: 8000
envFrom: # <-- NOVO
- configMapRef:
name: moj-servis-config # <-- ConfigMap
env: # <-- NOVO
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: moj-servis-secret # <-- 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"

1
manifesti Submodule

Submodule manifesti added at 36538872fc