From 99b9c56615a7e2a7180f83f95df3b40714107bd4 Mon Sep 17 00:00:00 2001 From: Petrraa Date: Mon, 25 May 2026 23:27:16 +0200 Subject: [PATCH] . --- manifests/app/deployment.yaml | 18 ++++++++++-------- manifests/app/ingress.yaml | 4 ++-- manifests/app/service.yaml | 2 +- manifests/config/configmap.yaml | 2 +- manifests/config/namespace.yaml | 2 +- manifests/database/deployment.yaml | 3 +-- manifests/database/service.yaml | 2 +- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/manifests/app/deployment.yaml b/manifests/app/deployment.yaml index 01e19a3..5ed3193 100644 --- a/manifests/app/deployment.yaml +++ b/manifests/app/deployment.yaml @@ -6,7 +6,7 @@ metadata: annotations: argocd.argoproj.io/sync-wave: "1" # deploy NAKON baze spec: - replicas: 1 + replicas: 3 selector: matchLabels: app: fastapi-api @@ -17,7 +17,14 @@ spec: spec: containers: - name: fastapi-api - image: petrraa/fastapi-todo-api:1.0 + image: git.fpmoz.sum.ba/dvasic/fastapi-todo-api:1.0 + resources: + requests: + cpu: "10m" + memory: "64Mi" + limits: + cpu: "50m" + memory: "128Mi" ports: - containerPort: 8000 env: @@ -46,14 +53,9 @@ spec: secretKeyRef: name: postgres-secret key: POSTGRES_DB - - name: MAX_TODOS - valueFrom: - configMapKeyRef: - name: fastapi-config - key: MAX_TODOS readinessProbe: httpGet: path: /health port: 8000 initialDelaySeconds: 15 - periodSeconds: 5 + periodSeconds: 5 \ No newline at end of file diff --git a/manifests/app/ingress.yaml b/manifests/app/ingress.yaml index daaadb9..12d636a 100644 --- a/manifests/app/ingress.yaml +++ b/manifests/app/ingress.yaml @@ -8,7 +8,7 @@ metadata: cert-manager.io/cluster-issuer: letsencrypt-prod spec: rules: - - host: petrraa.fpmoz.sum.ba # zamijenite! + - host: petrraa.fpmoz.sum.ba http: paths: - path: / @@ -21,4 +21,4 @@ spec: tls: - hosts: - petrraa.fpmoz.sum.ba - secretName: fastapi-api-tls + secretName: fastapi-api-tls \ No newline at end of file diff --git a/manifests/app/service.yaml b/manifests/app/service.yaml index de7d684..d6f0f82 100644 --- a/manifests/app/service.yaml +++ b/manifests/app/service.yaml @@ -9,4 +9,4 @@ spec: ports: - port: 80 targetPort: 8000 - type: NodePort + type: ClusterIP \ No newline at end of file diff --git a/manifests/config/configmap.yaml b/manifests/config/configmap.yaml index c291d54..27c5eac 100644 --- a/manifests/config/configmap.yaml +++ b/manifests/config/configmap.yaml @@ -7,4 +7,4 @@ data: MAX_TODOS: "100" DATABASE_HOST: postgres-service DATABASE_PORT: "5432" - APP_ENV: production + APP_ENV: production \ No newline at end of file diff --git a/manifests/config/namespace.yaml b/manifests/config/namespace.yaml index 58e7f0c..8af11a0 100644 --- a/manifests/config/namespace.yaml +++ b/manifests/config/namespace.yaml @@ -3,4 +3,4 @@ kind: Namespace metadata: name: student-petrraa labels: - managed-by: argocd + managed-by: argocd \ No newline at end of file diff --git a/manifests/database/deployment.yaml b/manifests/database/deployment.yaml index 184f41d..8b29439 100644 --- a/manifests/database/deployment.yaml +++ b/manifests/database/deployment.yaml @@ -32,5 +32,4 @@ spec: volumes: - name: postgres-data persistentVolumeClaim: - claimName: postgres-pvc # disk koji smo rezervirali - \ No newline at end of file + claimName: postgres-pvc # disk koji smo rezervirali \ No newline at end of file diff --git a/manifests/database/service.yaml b/manifests/database/service.yaml index dd85621..7efba8c 100644 --- a/manifests/database/service.yaml +++ b/manifests/database/service.yaml @@ -9,4 +9,4 @@ spec: ports: - port: 5432 targetPort: 5432 - type: NodePort # dostupno samo unutar clustera + type: ClusterIP # dostupno samo unutar clustera