I have been wondering about the same thing. The docs are very confusing when it comes to this. In the docs, the parts referring to the config.toml seem like they’re talking about using an executor that’s not inside the kubernetes clunter. I’m using Helm to install the executor and in that case, as far as I understand, values.yaml is used to configure the runner.
I had a similar problem in which I had to add a volume. The problem is that the register command appends the full runner section.
I manipulated the config map generated by the helm in order to add a template config file as described in the following example - https://docs.gitlab.com/runner/register/#example and then restarted the pod.
Steps:
Add another file to the configmap that contains the template
on the entrypoint section of the config map before running the registration add:
export TEMPLATE_CONFIG_FILE=–template-config=/scripts/template_config.toml
replace the config map
restart the pod
I would suggest to add a template config section to the helm values file and add it to the config map + define the relevant environment variable to the pod.
Don’t mean to revive an older thread, but this question seems to remain valid. I’m in need of adding a volume to runners and while the documentation for doing so via config.toml is quite complete, it’s unclear how to add this when using the helm chart for starting the gitlab-ci-runner instance itself.