From af0ffe81eaaae74140ac9bcb031f91ae933ddde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petra=20C=CC=8Ci=CC=81halova=CC=81?= Date: Wed, 17 Jul 2024 12:00:30 +0200 Subject: [PATCH] set cpu and memory resources for the worker init container the rbac worker init container runs migrations and seeding jobs that are very cpu and memory intensive so we want to set resources separately for init container and for the worker container itself --- deploy/rbac-clowdapp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/deploy/rbac-clowdapp.yml b/deploy/rbac-clowdapp.yml index 9ba278753..354523bbe 100644 --- a/deploy/rbac-clowdapp.yml +++ b/deploy/rbac-clowdapp.yml @@ -42,6 +42,13 @@ objects: command: - sh - /opt/rbac/deploy/init-container-setup.sh + resources: + limits: + cpu: ${INIT_WORKER_CPU_LIMIT} + memory: ${INIT_WORKER_MEMORY_LIMIT} + requests: + cpu: ${INIT_WORKER_CPU_REQUEST} + memory: ${INIT_WORKER_MEMORY_REQUEST} command: - /bin/bash - '-c' @@ -765,6 +772,22 @@ parameters: displayName: Memory Limit name: CELERY_WORKER_MEMORY_LIMIT value: 512Mi +- description: Initial amount of CPU the init worker container will request. + displayName: RBAC worker init container CPU Resource Request + name: INIT_WORKER_CPU_REQUEST + value: 500m +- description: Maximum amount of CPU the init worker container can use. + displayName: RBAC worker init container CPU Resource Limit + name: INIT_WORKER_CPU_LIMIT + value: 2000m +- description: Initial amount of memory the init worker container will request. + displayName: RBAC worker init container Memory Resource Request + name: INIT_WORKER_MEMORY_REQUEST + value: 512Mi +- description: Maximum amount of memory the init worker container can use. + displayName: RBAC worker init container Memory Resource Limit + name: INIT_WORKER_MEMORY_LIMIT + value: 3Gi - displayName: Django Debug name: DJANGO_DEBUG value: 'False'