From c72b671f04deb6a512869dacc7e437377f638fa3 Mon Sep 17 00:00:00 2001 From: Tarashish Mishra Date: Thu, 22 Feb 2024 13:17:45 +0530 Subject: [PATCH] Move resource allocation to the api container (#15) --- helm/osmcha/templates/app.yaml | 9 ++------- helm/osmcha/values.yaml | 8 +++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/helm/osmcha/templates/app.yaml b/helm/osmcha/templates/app.yaml index 066ce04..23b159e 100644 --- a/helm/osmcha/templates/app.yaml +++ b/helm/osmcha/templates/app.yaml @@ -37,13 +37,6 @@ spec: python manage.py collectstatic --noinput mkdir -p /staticfiles/static cp -r /app/staticfiles/* /staticfiles/static/ - resources: - requests: - cpu: "2" - memory: "6Gi" - limits: - cpu: "2" - memory: "6Gi" env: - name: POSTGRES_HOST @@ -91,6 +84,8 @@ spec: - --access-logfile - "-" - config.wsgi + resources: + {{- toYaml .Values.app.api.resources | nindent 10 }} env: - name: POSTGRES_HOST value: {{ .Values.app.api.postgres_host}} diff --git a/helm/osmcha/values.yaml b/helm/osmcha/values.yaml index 5053fbc..e9cd588 100644 --- a/helm/osmcha/values.yaml +++ b/helm/osmcha/values.yaml @@ -15,6 +15,13 @@ app: image: repository: ghcr.io/osmcha/osmcha-django tag: f267991c1d35929763bfb7a75dfd1e75afe01c69 + resources: + requests: + memory: "2G" + cpu: "1" + limits: + memory: "4G" + cpu: "2" postgres_host: osmcha-database.cz9ktd5n6tn5.us-east-1.rds.amazonaws.com postgres_user: postgres postgres_database: osmcha @@ -22,7 +29,6 @@ app: # OSMCha frontend - runs as a sidecar to the API ui: - replicas: 1 nodeSelector: {} image: repository: ghcr.io/osmcha/osmcha-frontend