|
| 1 | +githubConfigUrl: "https://github.com/llvm" |
| 2 | +githubConfigSecret: "github-token" |
| 3 | + |
| 4 | +minRunners: 0 |
| 5 | +maxRunners: 4 |
| 6 | + |
| 7 | +containerMode: |
| 8 | + type: "kubernetes" |
| 9 | + kubernetesModeWorkVolumeClaim: |
| 10 | + accessModes: ["ReadWriteOnce"] |
| 11 | + storageClassName: "standard-rwo" |
| 12 | + resources: |
| 13 | + requests: |
| 14 | + storage: "100Gi" |
| 15 | + kubernetesModeServiceAccount: |
| 16 | + annotations: |
| 17 | + |
| 18 | +template: |
| 19 | + spec: |
| 20 | + tolerations: |
| 21 | + - key: "premerge-platform" |
| 22 | + operator: "Equal" |
| 23 | + value: "linux" |
| 24 | + effect: "NoSchedule" |
| 25 | + nodeSelector: |
| 26 | + premerge-platform: linux |
| 27 | + containers: |
| 28 | + - name: runner |
| 29 | + image: ghcr.io/actions/actions-runner:latest |
| 30 | + command: ["/home/runner/run.sh"] |
| 31 | + resources: |
| 32 | + # The container will be scheduled on the same node as this runner. |
| 33 | + # This means if we don't set the CPU request high-enough here, 2 |
| 34 | + # containers will be scheduled on the same pod, meaning 2 jobs. |
| 35 | + # |
| 36 | + # This number should be: |
| 37 | + # - greater than number_of_cores / 2: |
| 38 | + # A value lower than that could allow the scheduler to put 2 |
| 39 | + # runners in the same pod. Meaning 2 containers in the same pod. |
| 40 | + # Meaning 2 jobs sharing the resources. |
| 41 | + # - lower than number_of_cores: |
| 42 | + # Each pod has some basic services running (metrics for ex). Those |
| 43 | + # already require some amount of CPU (~0.5). This means we don't |
| 44 | + # exactly have N cores to allocate, but N - epsilon. |
| 45 | + # |
| 46 | + # Memory however shall be handled at the container level. The runner |
| 47 | + # itself doesn't need much, just using something enough not to get |
| 48 | + # OOM killed. |
| 49 | + requests: |
| 50 | + cpu: 50 |
| 51 | + memory: "2Gi" |
| 52 | + limits: |
| 53 | + cpu: 56 |
| 54 | + memory: "2Gi" |
| 55 | + env: |
| 56 | + - name: ACTIONS_RUNNER_CONTAINER_HOOKS |
| 57 | + value: /home/runner/k8s/index.js |
| 58 | + - name: ACTIONS_RUNNER_POD_NAME |
| 59 | + valueFrom: |
| 60 | + fieldRef: |
| 61 | + fieldPath: metadata.name |
| 62 | + - name: ACTIONS_RUNNER_REQUIRE_JOB_CONTAINER |
| 63 | + value: "true" |
| 64 | + - name: ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE |
| 65 | + value: "/home/runner/pod-config/linux-container-pod-template.yaml" |
| 66 | + volumeMounts: |
| 67 | + - name: container-pod-config |
| 68 | + mountPath: /home/runner/pod-config |
| 69 | + securityContext: |
| 70 | + fsGroup: 123 |
| 71 | + volumes: |
| 72 | + - name: container-pod-config |
| 73 | + configMap: |
| 74 | + name: linux-container-pod-template |
0 commit comments