From e4287a4e4873703b6e058e90128db7baabbeaa5a Mon Sep 17 00:00:00 2001 From: Jason Montleon Date: Mon, 2 Jun 2025 09:31:45 -0400 Subject: [PATCH] :bug: Add requests and limits for additional containers Signed-off-by: Jason Montleon --- roles/tackle/defaults/main.yml | 4 ++++ roles/tackle/templates/customresource-rhbk-keycloak.yml.j2 | 7 +++++++ roles/tackle/templates/deployment-hub.yml.j2 | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/roles/tackle/defaults/main.yml b/roles/tackle/defaults/main.yml index fc15eae7..59602135 100644 --- a/roles/tackle/defaults/main.yml +++ b/roles/tackle/defaults/main.yml @@ -35,6 +35,10 @@ hub_container_limits_cpu: "1" hub_container_limits_memory: "2Gi" hub_container_requests_cpu: "500m" hub_container_requests_memory: "1Gi" +hub_init_container_limits_cpu: "1" +hub_init_container_limits_memory: "2Gi" +hub_init_container_requests_cpu: "500m" +hub_init_container_requests_memory: "1Gi" hub_database_filename: "hub.db" hub_database_volume_name: "{{ hub_service_name }}-database" hub_database_volume_size: "10Gi" diff --git a/roles/tackle/templates/customresource-rhbk-keycloak.yml.j2 b/roles/tackle/templates/customresource-rhbk-keycloak.yml.j2 index 4ab04bbe..3a656f90 100644 --- a/roles/tackle/templates/customresource-rhbk-keycloak.yml.j2 +++ b/roles/tackle/templates/customresource-rhbk-keycloak.yml.j2 @@ -17,6 +17,13 @@ spec: key: POSTGRES_PASSWORD proxy: headers: xforwarded + resources: + limits: + cpu: {{ keycloak_sso_container_limits_cpu }} + memory: {{ keycloak_sso_container_limits_memory }} + requests: + cpu: {{ keycloak_sso_container_requests_cpu }} + memory: {{ keycloak_sso_container_requests_memory }} http: tlsSecret: {{ rhbk_tls_secret_name }} hostname: diff --git a/roles/tackle/templates/deployment-hub.yml.j2 b/roles/tackle/templates/deployment-hub.yml.j2 index fcc773c5..08c642af 100644 --- a/roles/tackle/templates/deployment-hub.yml.j2 +++ b/roles/tackle/templates/deployment-hub.yml.j2 @@ -220,6 +220,13 @@ spec: image: "{{ hub_image_fqin }}" imagePullPolicy: "{{ image_pull_policy }}" name: update-perms + resources: + limits: + cpu: {{ hub_init_container_limits_cpu }} + memory: {{ hub_init_container_limits_memory }} + requests: + cpu: {{ hub_init_container_requests_cpu }} + memory: {{ hub_init_container_requests_memory }} securityContext: runAsUser: 0 volumeMounts: