Add support for using runner arch in helper_image

What does this MR do?

By default Kubernetes executor determines helper arch to use based on image used. When a custom helper_image is configured this functionality is lost. This adds support for config like:

[runners.kubernetes]
  helper_image = "myregistry.com/gitlab-org/gitlab-runner/gitlab-runner-helper:${CI_RUNNER_ARCH}-v${CI_RUNNER_VERSION}"

Why was this MR needed?

So a single Kubernetes runner could support arm64, x86_64, etc

What's the best way to test this MR?

  • Setup runner with above config
  • Test jobs using image: ubuntu and image: arm64v8/ubuntu

What are the relevant issue numbers?

Follow on

  • Use in examples at minimum on docs/configuration/advanced-configuration.md
Edited by Ben Bodenmiller

Merge request reports

Loading