Skip to content

Consider node selector overwrites for the helper image

What does this MR do?

When using the Node Selector Overwrite functionality, if you change architecture the job will fail because it will still try to bring up the runner helper with x86_64 (or whatever you have specified in your config).
This MR ensures that the runner helper image selection takes that overwrite into consideration.

Why was this MR needed?

Before the node selector overwrite feature was introduced I had to deploy the gitlab runner helm chart multiple times with different configuration to satisfy the node selector criteria for different underlying host types needed for our pipelines (x86_64, x86_64 with GPU, arm64).
Since it's release I wanted to consolidate down to a single helm chart deployment and use the override functionality. This helps prevent code duplication and consolidates my config to a single location, it's also handy because it also means we can have a single session_server that will work for them all (in terms of having the "debug" button available in job execution).
This was fine where the architecture remained the same, but wouldn't work where it was different.

What's the best way to test this MR?

I have added a unit test for the new functionality, you can also build the branch and test that the runner selects the correct helper image when you overwrite the arch in the job variables.

What are the relevant issue numbers?

N/A - I didn't raise an issue on this occasion, as it seemed fairly trivial to resolve with an MR.

Edited by Mike Hobbs

Merge request reports