From b3d9a96316b6c9542fb56ab9dcbbb00379740d50 Mon Sep 17 00:00:00 2001 From: "tom.chivert" Date: Wed, 5 Mar 2025 11:40:28 +0100 Subject: [PATCH] gitlab-runner - allow to add limits to dind container --- templates/compose/gitlab-runner.yml.j2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/compose/gitlab-runner.yml.j2 b/templates/compose/gitlab-runner.yml.j2 index b5f16e7..0100b6d 100644 --- a/templates/compose/gitlab-runner.yml.j2 +++ b/templates/compose/gitlab-runner.yml.j2 @@ -51,4 +51,11 @@ services: logging: driver: syslog options: - tag: docker_gitlab-runner \ No newline at end of file + tag: docker_gitlab-runner +{% if gitlab_runner_dind_limits is defined %} + deploy: + resources: + limits: + cpus: '{{ gitlab_runner_dind_limits_cpus | default("4") }}' + memory: {{ gitlab_runner_dind_limits_memory | default("8G") }} +{% endif %}