Deprecated values in runner are required
When providing configuration in runner.config the config that is generated in /home/gitlab-runner/.gitlab-runner/config.toml doesn't those values.
runners:
config: |
[[runners]]
[runners.kubernetes]
namespace = "runners"
pull_policy = ["always"]
Produces:
[[runners]]
[runners.kubernetes]
namespace = "default"
pull_policy = [""]
If runners.namespace and runners.imagePullPolicy are set it produces the expected result (which are both deprecated).
After looking at the gitlab-runner code it looks like the default environment variables being set by the chart are overriding the template values.
The fix is potentially wrapping all deprecated values being set using environment variables in if statements. So they won't be set.
{{- if .Values.runners.imagePullPolicy }}
- name: KUBERNETES_PULL_POLICY
value: {{ .Values.runners.imagePullPolicy | quote }}
{{- end }}
Edited by Matthew Warman