From 1023718b87eca7db0e8cf308fa946d036c005ee9 Mon Sep 17 00:00:00 2001 From: Christian Adams Date: Wed, 3 May 2023 17:41:01 -0400 Subject: [PATCH] Allow configuration of resource requirements for init containers (#1392) - In some use cases, limits must be set for every container in a cluster. To address this, we will use the task and web resource requirements for the initContainers where applicable. --- roles/installer/templates/deployments/task.yaml.j2 | 1 + roles/installer/templates/deployments/web.yaml.j2 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/roles/installer/templates/deployments/task.yaml.j2 b/roles/installer/templates/deployments/task.yaml.j2 index fe7663a1..da2bde0c 100644 --- a/roles/installer/templates/deployments/task.yaml.j2 +++ b/roles/installer/templates/deployments/task.yaml.j2 @@ -112,6 +112,7 @@ spec: - name: init-projects image: '{{ _init_projects_container_image }}' imagePullPolicy: '{{ image_pull_policy }}' + resources: {{ task_resource_requirements }} command: - /bin/sh - -c diff --git a/roles/installer/templates/deployments/web.yaml.j2 b/roles/installer/templates/deployments/web.yaml.j2 index 9e7ceb06..e166c591 100644 --- a/roles/installer/templates/deployments/web.yaml.j2 +++ b/roles/installer/templates/deployments/web.yaml.j2 @@ -68,6 +68,7 @@ spec: - name: init image: '{{ _init_container_image }}' imagePullPolicy: '{{ image_pull_policy }}' + resources: {{ web_resource_requirements }} command: - /bin/sh - -c @@ -96,6 +97,7 @@ spec: - name: init-projects image: '{{ _init_projects_container_image }}' imagePullPolicy: '{{ image_pull_policy }}' + resources: {{ web_resource_requirements }} command: - /bin/sh - -c