Skip to content

Node tolerations

Chris Hoffman requested to merge VertivSRE/gitlab-runner:node-tolerations into master

What does this MR do?

Add ability to specify taint tolerations for runner pods in kubernetes executor. Configuration input for these tolerations is enabled with environment variables since that is a preferred method on injecting runner configuration when the runner itself is scheduled on kubernetes. Additionally the previously supported node selector configuration is given an environment variable pass through as well because that is often paired with use of tolerations.

Why was this MR needed?

Since certain workloads a runner may need require more or specialized configuration over those of standard services, it is useful to isolate runner pods to task specific machines. This can be accomplished in kubernetes with taints to prevent other workloads from running on those machines. An example is privileged pod execution to allow docker-in-docker which is not a capability normal workloads should have and is a binary capability enabled on the kubelet for a node.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

#2681 (closed)
!747 (closed)
!938 (closed) - This does a similar addition, but it does not enable environment configuration. It additionally support configuring the number of seconds a pod should tolerate a taint before being evicted. This configuration only works with the NoExecute taint which is meant for complete work stoppage, not just segregation. Since that configuration is orthogonal to the work of a CI runner, it was not included here.

Edited by Chris Hoffman

Merge request reports