Skip to content

Multiple runner registration

This is an additional merge-request which contains the changes of !340 (closed) and more. I made this new extended merge request because there is currently no progress in !340 (closed)

What does this MR do?

This merge request enable registering multiple runners with a single helm chart.

Why was this MR needed?

We want to have multiple group runners and every group should have the same concurrent setting ignoring the number of runners for each group. This can only be handled with multiple runners.

What's the best way to test this MR?

Example values.yaml with two runners

concurrent: 30
checkInterval: 20
rbac:
  create: true
unregisterRunners: true
runners:
  - name: "runner-test1"
    tags: "runner1,test1"
    registrationToken: "<TOKEN>"
    config: |
      [[runners]]
        name = "k8s-bm-runner-test1"
        url = "https://<URL>"
        executor = "kubernetes"
  - name: "k8s-bm-runner-test2"
    tags: "runner2,test2"
    registrationToken: "<TOKEN>"
    config: |
      [[runners]]
        name = "k8s-bm-runner-test2"
        url = "https://<URL>"
        executor = "kubernetes"

Example values.yaml with two runners and registrationToken secret mount

concurrent: 30
checkInterval: 20
rbac:
  create: true
unregisterRunners: true
runners:
  - name: "runner-test1"
    tags: "runner1,test1"
    config: |
      [[runners]]
        name = "k8s-bm-runner-test1"
        url = "https://<URL>"
        executor = "kubernetes"
  - name: "k8s-bm-runner-test2"
    tags: "runner2,test2"
    config: |
      [[runners]]
        name = "k8s-bm-runner-test2"
        url = "https://<URL>"
        executor = "kubernetes"
 secrets:
  - name: runner-registration-token
    items:
      - key: runner-registration-token
        path: runner-registration-token-0
  - name: runner-registration-token
    items:
      - key: runner-registration-token
        path: runner-registration-token-1

What are the relevant issue numbers?

gitlab-org/gitlab-runner#3921

Edited by Thorsten Banhart

Merge request reports