gitlab runner workers to land on a particular node
Ok so recently i had an issue with my gitlab runners which were spawning on spot instances. i wanted to make the worker pods for the runner sit only on on-demand nodes. This i did by the help of a node selector and then configuring same in the values.yaml and below is the snippet for same:
config: |
[[runners]]
[runners.kubernetes]
namespace = "{{.Release.Namespace}}"
image = "ubuntu:20.04"
[runners.kubernetes.node_selector]
my_awsome_node_key = "on-demand"
Please note that there is also a place in the values.yaml (if you search with nodeSelector), however thiat is for them gitlab runner manager.
So my problem was that though i could get the manager to sit on the on-demand nodes but i was not able to do same for the worker gitlab runner pods and with the above code snippet i could achieve it!
Happy gitlabbing, happy helming.
Clap this post if you like it! Otherwise have a niced day/night/whatever…
chao