Description
What would you like added?
The ability to configure an affinity for the runner pod in Kubernetes mode.
I want to be able to give following configuration of the runner pod in the chart values:
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: toto
operator: In
values:
- myNodePool
containers:
- name: runner
image: runnerImage
command: ["/home/runner/run.sh"]
securityContext:
privileged: true
env:
- name: ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE
value: /home/runner/workflow-extension.yml
volumeMounts:
- name: workflow-extension
mountPath: /home/runner/workflow-extension.yml
subPath: workflow-extension.yml
Why is this needed?
This is needed to resolve an issue with Kubernetes mode where runner pods are scheduled on light nodes who don't have enough resources to run the associated workflow pod.
Additional context
In my specific setup, I have a cluster with two different kind of workers: nodes with 8 CPU and nodes with 32 CPU. I have set some CPU requests on the ARC workflow pod (the "$job" pod) thanks to worklow-extension.yml, and this pod needs 16 CPU on the node to run.
The problem is that the runner pod of ARC is automatically scheduled on the lightest 8 CPU nodes because it doesn't request a lot of CPUs, but then the workflow pod is not able to start because he is forced on a node with insufficient CPU (due to the shared PVC between runner and workflow).