Gitlab build container not using specified cpu/memory limits?
I am trying to spin up a Gitlab runner instance in our Rancher Kubernetes environment using the Gitlab-Runner Helm chart.
I've got the runner started successfully, however whenever I run a pipeline, I get the following error:
Running with gitlab-runner 14.1.0~beta.50.g5da932f9 (5da932f9)
on gitlab-runner-5898759dcf-vxjb5 QWvJYfp5
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: gitlab
Using Kubernetes executor with image docker:latest ...
Using attach strategy to execute scripts...
Preparing environment
00:00
ERROR: Job failed (system failure): prepare environment: setting up build pod: pods "runner-qwvjyfp5-project-1055-concurrent-0hd42x" is forbidden: failed quota: default-zg9sg: must specify limits.cpu,limits.memory,requests.cpu,requests.memory. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
I thought this was a simple problem so I went and added cpu and memory limits to the config in the values.yaml:
runners:
# runner configuration, where the multi line strings is evaluated as
# template so you can specify helm values inside of it.
#
# tpl: https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function
# runner configuration: https://docs.gitlab.com/runner/configuration/advanced-configuration.html
config: |
[[runners]]
[runners.kubernetes]
namespace = "gitlab"
service-account = "gitlab-runner"
image = "ubuntu:16.04"
cpu_limit = "100m"
cpu_request = "50m"
memory_limit = "100Mi"
memory_request = "50Mi"
However, the same problem persists.
I also added in the equivilant helper_limit/request.. and service_limit/request... values into the config but that makes no difference.
So how do I setup the build container memory limits? Is it currently bugged?