azureazure-aksgithub-actions-self-hosted-runners

ARC Self-hosted jobs queued "Waiting for a runner to pick up this job... "


I have setup ARC and its runners on my Azure AKS cluster. Following this tutorial. The problem is that my job remains queued and never starts. There appear to be no errors in any of my logs. What have I missed?

Requested labels: arc-runners
Job defined at: SH-Proptech/k8s/.github/workflows/arc.yaml@refs/heads/main
Waiting for a runner to pick up this job...

My Job

name: Actions Runner Controller Test
on:
  # Trigger the workflow manually
  workflow_dispatch:

jobs:
  Test-Arc-Runners:
    runs-on: 
      labels: arc-runners  # Ensure this matches the label of your self-hosted runner
    steps:
    - run: echo "🎉 This job uses runner scale set runners!"

My helm commands

  helm upgrade --install arc \
    --namespace arc \
    --create-namespace \
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller


  helm upgrade --install arc-runners \
    --namespace arc-runners \
    --create-namespace \
    --values ./values/arc.yaml \
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set

My values.yaml. I am using a PAT from my user to access my org. (Maybe this is the issue)

githubConfigUrl: "https://github.com/<my-org>"
githubConfigSecret: "arc"
maxRunners: 5
minRunners: 1

My runner set

kubectl describe autoscalingrunnersets -n arc-runners
Name:         arc-runners
Namespace:    arc-runners
Labels:       actions.github.com/organization=<my-org>
              actions.github.com/scale-set-name=arc-runners
              actions.github.com/scale-set-namespace=arc-runners
              app.kubernetes.io/component=autoscaling-runner-set
              app.kubernetes.io/instance=arc-runners
              app.kubernetes.io/managed-by=Helm
              app.kubernetes.io/name=arc-runners
              app.kubernetes.io/part-of=gha-rs
              app.kubernetes.io/version=0.10.1
              helm.sh/chart=gha-rs-0.10.1
Annotations:  actions.github.com/cleanup-manager-role-binding: arc-runners-gha-rs-manager
              actions.github.com/cleanup-manager-role-name: arc-runners-gha-rs-manager
              actions.github.com/cleanup-no-permission-service-account-name: arc-runners-gha-rs-no-permission
              actions.github.com/runner-group-name: Default
              actions.github.com/runner-scale-set-name: arc-runners
API Version:  actions.github.com/v1alpha1
Kind:         AutoscalingRunnerSet
Metadata:
  Creation Timestamp:  2025-02-16T18:01:33Z
  Finalizers:
    autoscalingrunnerset.actions.github.com/finalizer
  Generation:        2
  ...
Spec:
  Github Config Secret:  arc
  Github Config URL:     https://github.com/<my-org>
  Max Runners:           5
  Min Runners:           1
  Template:
    Spec:
      Containers:
        Command:
          /home/runner/run.sh
        Image:               ghcr.io/actions/actions-runner:latest
        Name:                runner
      Restart Policy:        Never
      Service Account Name:  arc-runners-gha-rs-no-permission
Status:
  Current Runners:            1
  Pending Ephemeral Runners:  1
Events:                       <none>

My Secret

kubectl describe secret -n arc-runners arc
Name:         arc
Namespace:    arc-runners
Labels:       app.kubernetes.io/managed-by=Helm
Annotations:  operator.1password.io/auto-restart: true
              operator.1password.io/item-path: vaults/<vault>
              operator.1password.io/item-version: 10

Type:  Opaque

Data
====
github_token:  <masked>

Github Settings

enter image description here


Solution

  • This is probably the biggest issue in ARC setups. In your workflow

    runs-on: 
       labels: arc-runners
    

    But in ARC, you don't assign labels that way. The runner scale set name is implicitly the label. Meaning, your workflow should have

    runs-on: arc-runners
    

    The key is, no nested labels: there.

    The correct final syntax will be

    jobs:
      Test-Arc-Runners:
        runs-on: arc-runners
        steps:
          - run: echo "🎉 This job uses runner scale set runners!"